相关疑难解决方法(0)

如何在DIV中的loooooong单词中强制换行?

好的,这真让我感到困惑.我在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'太长了.

如何强制浏览器在必要时"破坏"单词以适应所有内容?

html css line-breaks

395
推荐指数
10
解决办法
37万
查看次数

如何从css换行,不使用<br />?

输出:

你好
,你好吗?

码:

<p>hello <br> How are you </p>
Run Code Online (Sandbox Code Playgroud)

如何实现相同的输出<br>

html css css3

373
推荐指数
14
解决办法
94万
查看次数

标签 统计

css ×2

html ×2

css3 ×1

line-breaks ×1