作者:可卡因 | 来源:互联网 | 2023-02-11 19:58
我怎样才能用文字包装文字.
这是问题:plunker链接
你知道怎么解决它吗?
1> andreas..:
你需要两个规则:
max-width
对于你的.card
元素(因为没有定义宽度CSS将不知道在哪里打破你的长词)或 overflow: hidden;
使.card
宽度不再取决于长字长
word-wrap: break-word;
告诉浏览器打破一个字
.card {
max-width: 100%;
}
.card-text {
word-wrap: break-word;
}
.card {
overflow: hidden;
}
.card-block {
word-wrap: break-word;
}
Card title
This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
Last updated 3 mins ago
Card title
This card has supporting text below as a natural lead-in to additional content.
Last updated 3 mins ago
Card title
supportingsupportingsupportingsupportingsupportingsupportingsupportingsupportingsupportingsupportingsupportingsupportingsupportingsupportingsupportingsupportingsupportingsupportingto additional content. This card has even longer content than the
first to show that equal height action.
Last updated 3 mins ago