gpt4 book ai didi

html - nbsp 的反义词是什么?

转载 作者:技术小花猫 更新时间:2023-10-29 11:29:27 25 4
gpt4 key购买 nike

  字符是不允许换行的空格。

<p>lorem ipsum here&nbsp;are&nbsp;some&nbsp;words and so on</p>

| lorem ipsum |
| here are some words and so |
| on |

与之相反的是什么?也就是说,一个字符不会呈现为空格,但可以用于换行。

<p>foo supercalifragilisticexpialidocious bar</p>
<!-- put char here ^ and here ^ -->

|foo supercalifragi |
|listicexpiali |
|docious bar |

or with wider size:

|foo supercalifragilisticexpiali |
|docious bar |

我知道 soft-hyphen character ,但出于我的目的,我特别希望在分隔符处添加连字符。

最佳答案

您需要 unicode 字符零宽空格 (\u200B)。

您可以使用 在 HTML 中获取它。

Explicit breaks and non-breaks:

LB7 : Do not break before spaces or zero width space.
LB8 : Break before any character following a zero-width space, even if one or more spaces intervene.
http://unicode.org/reports/tr14/

关于html - nbsp 的反义词是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2046530/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com