【发布时间】:2018-08-10 20:14:30
【问题描述】:
我正在使用 ionic 4,但在尝试在“离子选择”内进行文本换行时遇到问题
我的选择如下所示:
如果我直接在谷歌浏览器(“检查元素”菜单上的样式部分)上将我的 css 更改为“空白:预包装”
看起来像这样:
这就是我想要的。
在我的 HTML 代码中,我有这个:
<ion-item>
<ion-label>Dirección de Entrega<a style="color: brown;">*</a></ion-label>
<ion-select [(ngModel)]="ordHerder.addressId" popover >
<ion-option style="white-space: pre-wrap !important;" *ngFor="let item of register_data.directions" value="{{item.recId}}" text-wrap>{{item.direction}}</ion-option>
</ion-select>
</ion-item>
还有我的 CSS:
shopping-car-delivery {
.alert-ios .alert-radio-label{ white-space: pre-wrap !important;}
.alert-md .alert-radio-label{ white-space: pre-wrap !important;}
.alert-wp .alert-radio-label{ white-space: pre-wrap !important;}
}
谢谢:)
【问题讨论】:
-
您找到解决方案了吗?我也在为此苦苦挣扎。
标签: css ionic-framework