我有这样的文字:
<p>One day I went to the park and then ate the apple.</p>
然后浏览器(由于包含宽度等)呈现如下:
One day I went to the park
and then ate the apple.
那么,我应该用哪个 [escape] 字符来获取虚线?如果该行被
打断,那就很容易了,但现在它不使用任何 HTML 标记来做到这一点。
最佳答案
<p>One day I went to the park and then ate the apple.</p>
“& n b s p ;”(非线性可断空间)用于制作空格时会产生这种行为。
关于javascript - 使用 JavaScript 获取 CSS/浏览器强制换行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24980253/