好的,这真让我感到困惑.我在div中有一些内容,如下所示:
<div style="background-color: green; width: 200px; height: 300px;">
Thisisatest.Thisisatest.Thisisatest.Thisisatest.Thisisatest.Thisisatest.
</div>
Run Code Online (Sandbox Code Playgroud)
但是,内容溢出了DIV(如预期的那样),因为'word'太长了.
如何强制浏览器在必要时"破坏"单词以适应所有内容?
输出:
你好
,你好吗?
码:
<p>hello <br> How are you </p>
Run Code Online (Sandbox Code Playgroud)
如何实现相同的输出<br>?