没有打破连字符 [英] no break hyphen

查看:71
本文介绍了没有打破连字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我已经搜索过这个,但没有任何快乐。


我有一个电子商务这个词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.com> scripsit:
Tim <Ci************@gmail.com> 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, http://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, http://www.cs.tut.fi/~jkorpela/


为人欢呼, />

jeremy,你的方法运行正常。


jukka,谢谢 - 好主意但有点啰嗦。

Tim

cheers guys,

jeremy, your method works fine.

jukka, thanks - nice idea but a bit longwinded.
Tim


这篇关于没有打破连字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆