i have problem with labels on Ionic v4. When i look at the screenshot, you will see the weird look.
But my code just copied from Ionic docs. Here my code
[![<ion-header>
<ion-toolbar color="primary">
<ion-title>
Titel
</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<ion-list>
<ion-item>
<ion-label>Default</ion-label>
<ion-input></ion-input>
</ion-item>
<ion-item>
<ion-label position="fixed">Fixed</ion-label>
<ion-input></ion-input>
</ion-item>
<ion-item>
<ion-label position="floating">Floating</ion-label>
<ion-input></ion-input>
</ion-item>
<ion-item>
<ion-label position="stacked">Stacked</ion-label>
<ion-input></ion-input>
</ion-item>
</ion-list>
</ion-content>]
You can try with removing the tag because in their official website they didn't used tag to wrap the elements.So You can try like that -
<!-- Inputs with labels --> <ion-item> <ion-label>Default Label</ion-label> <ion-input></ion-input> </ion-item> <ion-item> <ion-label position="floating">Floating Label</ion-label> <ion-input></ion-input> </ion-item> <ion-item> <ion-label position="fixed">Fixed Label</ion-label> <ion-input></ion-input> </ion-item> <ion-item> <ion-label position="stacked">Stacked Label</ion-label> <ion-input></ion-input> </ion-item>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.