如何在Ionic 2中使用离子卡的文本换行? [英] How to use text-wrap for ion-card in Ionic 2?
本文介绍了如何在Ionic 2中使用离子卡的文本换行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
情况:
我需要使用 text-wrap
离子卡,但它似乎不起作用。
I need to use the text-wrap
for an ion-card but it seems it doesn't work.
代码:
<ion-card>
<ion-card-header text-wrap>
<h2> <ion-icon name="list-box"></ion-icon> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labor</h2>
</ion-card-header>
<ion-card-content>
<p>content</p>
</ion-card-content>
</ion-card>
THE PLUNKER :
http://plnkr.co/edit/z5ehOQgz0oArhg6mMtUj?p=preview
问题:
有一种方法可以使用文本换行对于离子卡?
There is a way to use text-wrap for the ion-card?
推荐答案
好的,设置 white-space:normal;
到 ion-card-header
修复此问题。
Ok, setting white-space: normal;
to the ion-card-header
fixed this.
< ion -card-header style =white-space:normal;>
也可以放在css文件中。
<ion-card-header style="white-space: normal;">
could be placed in css file as well.
Plunker:< a href =http://plnkr.co/edit/GjDmJBNMdnoPiteAKpDB =noreferrer> http://plnkr.co/edit/GjDmJBNMdnoPiteAKpDB
这篇关于如何在Ionic 2中使用离子卡的文本换行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文