gpt4 book ai didi

html - 链接中的不间断空格

转载 作者:太空宇宙 更新时间:2023-11-04 03:14:04 24 4
gpt4 key购买 nike

在网站的子导航中,我尝试获取链接 Suite «Mont Blanc»,它是从后端读出的,要像这样包装:

      Suite
«Mont Blanc»

而不是:

  Suite «Mont
      Blanc»

我知道有   但如果我将其插入结构元素名称(作为链接列出),该链接将不再正常工作。

有没有一种我可以使用的不可见的不可破坏的空间?

最佳答案

这样使用: Demo

CSS:

span{
white-space: nowrap;
}

HTML:

Suite
<span>«Mont Blanc» </span>

编辑:

如果你需要下一行的跨度内容你可以这样试试: Demo

span{
clear:both;
display:block;
white-space: nowrap;
}

关于html - 链接中的不间断空格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29010278/

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