文字超越了div。如何强制执行不会在div之外溢出的段落?
.preview {
background: red;
width: 200px;
}

<div class="preview">
<p>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</p>
</div>
&#13;
答案 0 :(得分:3)
使用自动换行:
.preview {
background: red;
width: 200px;
word-wrap: break-word;
}
<div class="preview">
<p>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</p>
</div>