没有打破连字符

编程入门 行业动态 更新时间:2024-10-12 14:22:57
本文介绍了没有打破连字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

大家好, 我已经搜索过这个,但没有任何快乐。 我有一个电子商务这个词html句子。 连字符允许商业部分换行到新行。 Yuck。 有没有打破连字符,就像没有休息空间一样? TIA TIM

hi all, I have searched for this, yet with no joy. I have the word e-commerce in an html sentence. The hyphen allows the commerce part to wrap to a new line. Yuck. Is there a no break hyphen, in the same way as a no break space? TIA TIM

推荐答案

Tim写道: 大家好, 我已经搜索过这个,但没有任何快乐。 我用html语句中的电子商务这个词。连字符允许商业部分换行。 Yuck。 有没有一个没有断裂的连字符,就像没有休息空间一样? TIA TIM hi all, I have searched for this, yet with no joy. I have the word e-commerce in an html sentence. The hyphen allows the commerce part to wrap to a new line. Yuck. Is there a no break hyphen, in the same way as a no break space? TIA TIM

是的。 Unicode字符U + 2011(HTML实体 - ) Jeremy

Yep. Unicode character U+2011 (HTML entity ‑) Jeremy

Tim< Ci ******** ****@gmail> scripsit: Tim <Ci************@gmail> scripsit: 我已经搜索过这个,但没有任何喜悦。 真的吗?我们最近讨论了连字符后换行符的主题, 在线程中在Mozilla中断开连字符和IE显示问题。 是否有中断连字符,就像没有休息空间一样? I have searched for this, yet with no joy. Really? We very recently discussed the topic of line breaks after hyphens, in the thread "Breaking hyphen in Mozilla and an IE display problem". Is there a no break hyphen, in the same way as a no break space?

你问题的正确答案是是,但这不是你的答案 需要。请检查前面的讨论。为了您的方便,这里是' _I_作为实际答案,正如我之前所写: 在更一般的情况下,为了防止不希望的换行,比方说,-a, 有几个选项,但实际的方法是非标准的 加价 < nobr> ; -a< / nobr> 和CSS的使用,例如使用标记 < span class =" nobr"> -a< / span> 带有CSS代码的 ..nobr {白色空间:nowrap; } - Yucca, www.cs.tut.fi/~jkorpela/

The correct answer to your question is "Yes", but this is not the answer you need. Please check the previous discussion. For your convenience, here''s what _I_ regard as the practical answer, as I wrote previously: In a more general case, to prevent an undesired line break in, say, -a, there are several options, but the practical approaches are the nonstandard markup <nobr>-a</nobr> and the use of CSS, e.g. using markup <span class="nobr">-a</span> with CSS code ..nobr { white-space: nowrap; } -- Yucca, www.cs.tut.fi/~jkorpela/

为人欢呼, /> jeremy,你的方法运行正常。 jukka,谢谢 - 好主意但有点啰嗦。 Tim cheers guys, jeremy, your method works fine. jukka, thanks - nice idea but a bit longwinded. Tim

更多推荐

没有打破连字符

本文发布于:2023-11-29 13:42:58,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1646546.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:字符

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!