可能的复制品:
CSS: 如何强制使用 XUL 和/或 HTML 包装长字符串(没有任何空白)
假设一个人有以下代码:
<div style="width:100px;height:1000px">This-is-a-long-line-of-text-without-any-spaces-This-is-a-long-line-of-text-without-any-spaces-This-is-a-long-line-of-text-without-any-spaces-This-is-a-long-line-of-text-without-any-spaces</div>
我道歉,但堆栈溢出(根据预览)不行分隔代码片段。
最下面(?)在下列情况下,将导致容纳长行文本的容器拉伸到其中包含的文本的全宽。
我们希望根据 css 指定的父容器的宽度(宽度: 100px)强制将其分行(甚至中间单词)。
这可能通过一个 CSS 标签,我不知道?
IE6 + 可比性,加上壁虎/网络工具包/歌剧请。