Ionic Stacked input - Show label below text field

走远了吗. 提交于 2019-12-23 01:07:09

问题


I am using the below code to show a stacked in Ionic version 2.

<ion-item>
    <ion-label color="primary" stacked>Joy to the world</ion-label>
    <ion-input value="C         G"></ion-input>
</ion-item>

By default the label displayed above the text field. But I want to show the label below the text field.

Is it possible to show the label below the text field.

Thanks for your help.


回答1:


How about overwriting these sass variables:

.item-label-stacked .input-wrapper,
.input-wrapper {
    flex-direction: column-reverse;
}
.label-md[stacked] {
    margin-top: 0;
}


来源:https://stackoverflow.com/questions/41506766/ionic-stacked-input-show-label-below-text-field

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!