HTML:软式炒作(& shy;)没有破折号? [英] HTML: Soft hypen (­) without dash?
问题描述
我有一个小小的布局问题:在客户网站上,我们在一个小盒子里显示人们的联系信息。该框的宽度受到限制。碰巧,有些名字很长的人(毕竟这是在德国......),而电子邮件地址是给定姓名和姓氏的拼接。结果是:使用特定的名称,电子邮件地址会溢出约盒的限制。
插入& shy; $ c在$
之前的$ c>会产生正确的换行符,但看起来像这样:
john.doe-
@ example.com
有可能压制那个短跑?我不想使用< br />
,因为对于90%的名称,可用宽度已经足够了。
& thinsp;
)&#8203;
)。 john.doe& thinsp; @ example.com
++ 我不会建议使用零宽度空间,因为显然某些浏览器无法正确显示它(< )
I have a little layout problem: on a clients website, we show contact information of people in a little box. The width of that box is constrained. As it happens, there are people with very long names (this is in Germany, after all...), and the email address is a concatenation of the given name and family name. The result: with certain names, the email address overflows the constraints given by the about box.
Inserting a ­
before the @
results in the correct line break, but looks like this:
john.doe-
@example.com
Is it possible to suppress that dash? I don't want to use <br />
, because for 90% of the names, the available width is more than enough.
Though I'm not sure how this does cross-browser (probably pretty well), you could always use the thin space character ( 
) or the zero-width space (++​
).
john.doe @example.com
++ I would not suggest using the zero-width space, as apparently some browsers will not render it correctly (source).
这篇关于HTML:软式炒作(& shy;)没有破折号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!