离子在离子项目中有两个关于单词包装的问题:
<div class="row responsive-sm">
<div class="col">
<div class="item item-body">
<ion-item class="wrap" style="word-wrap: break-word; word-break: break-all;">
#fashion #fashion #fashion #fashion #fashion #fashion #fashion #fashion #fashion #fashion #fashion #fashion #fashion #fashion #fashion #fashion #fashion #fashion
</ion-item>
</div>
</div>
</div>下面是完整的HTML,以显示问题码页
发布于 2015-09-01 15:21:07
离子1的:
将item-text-wrap 类添加到项中。
<ion-item class="item-text-wrap">
some long string
</ion-item>离子2的:
向item添加text-wrap 属性。
<ion-item text-wrap>
some long string
</ion-item>发布于 2016-07-28 18:31:06
在Ionic 2中,使用text-wrap属性
<ion-item text-wrap>
text here wraps to multiple lines
</ion-item>发布于 2019-05-13 18:19:32
对于Ionic 4,在您的text-wrap元素上使用ion-label,如下所示:
<ion-item>
<ion-label text-wrap>
Multiline text that should wrap when it is too long
to fit on one line in the item.
</ion-label>
</ion-item>更新: 10/30/2019 - CSS实用程序属性现在在Ionic 4的最新版本中被废弃,并且将在Ionic 5中完全消失。
建议继续使用class="ion-text-wrap":
<ion-item>
<ion-label class="ion-text-wrap">
Multiline text that should wrap when it is too long
to fit on one line in the item.
</ion-label>
</ion-item>https://stackoverflow.com/questions/32335101
复制相似问题