我有两个内联跨度。代码示例:
<div class="comment_content">
<span class="comment_author"><?= $child_comment['comment_author'] ?></span>
<span class="comment_text"><?= $child_comment['comment_content'] ?></span>
</div>
和 scss 示例:
.comment_content {
word-wrap: break-word;
}
.comment_author {
display: inline-block;
vertical-align:top;
}
.comment_text {
display: inline-block;
word-wrap: break-word;
width: 100%;
}
If my expected view has to be:
If user enters string without spaces, string won't break. And breaks design:
如何正确断掉长单词?
white-space: nowrap
会阻止word-break
自生效。一些模板适用white-space: nowrap
这需要用以下内容覆盖此属性white-space: normal
.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)