如何解决网页上的软连字符问题?在文本中可能有一些长词,您可能想要用连字符换行.但是你不希望连字符显示整个单词是否在同一行.
根据这个页面 <wbr>上的评论是由Netscape发明的非标准"标签汤".它似乎­ 也存在标准合规性方面的问题.似乎没有办法为所有浏览器提供有效的解决方案.
处理软连字符的方法是什么?为什么选择它?有优选的解决方案还是最佳实践?
一个 字符是不允许换行的空间.
<p>lorem ipsum here are some words and so on</p>
| lorem ipsum |
| here are some words and so |
| on |
Run Code Online (Sandbox Code Playgroud)
与此相反的是什么?也就是说,一个字符不是作为空格呈现的,但可以用于换行.
<p>foo supercalifragilisticexpialidocious bar</p>
<!-- put char here ^ and here ^ -->
|foo supercalifragi |
|listicexpiali |
|docious bar |
or with wider size:
|foo supercalifragilisticexpiali |
|docious bar |
Run Code Online (Sandbox Code Playgroud)
我知道的软连字符,但我的目的,我专门做不希望在休息加连字符.