不打破括号? [英] Non-breaking parentheses?

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

问题描述

在灵活布局网站的页脚中,我注意到IE倾向于在括号字符上换行(在这种情况下是电话号码)。是否有一个在视觉上等价的非断点括号,与非断线空格和非断点连字符类似,我可以使用它吗?

解决方案试试这个:

  .phone {
white-space:nowrap;
}

< p>在< span class =phone> +34(947)12 34 56 78< / span>以供进一步查询。< / p>

您可以做很多其他事情(从< nobr> 标记到某些Unicode字符),但它们不像这样跨浏览器。


In the footer of a flexible-layout website I've noticed that IE tends to line-wrap on parenthesis characters (in a phone number in this case). Is there a visually equivalent non-breaking parenthesis, in a similar vein to non-breaking spaces and non-breaking hyphens, that I can use instead?

解决方案

Try this:

.phone{
    white-space: nowrap;
}

<p>Call Customer Support at <span class="phone">+34 (947) 12 34 56 78</span> for further enquiries.</p>

You can do many other things (from <nobr> tag to certain Unicode chars) but they aren't as cross-browser as this.

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

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