文字装饰:下划线与边框底 [英] text-decoration: underline vs border-bottom

查看:93
本文介绍了文字装饰:下划线与边框底的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 {text-decoration:underline} {border-bottom:...}

这易于样式设置并与跨浏览器兼容吗?

which is easy to style and cross browser compatible?

何时应使用边框底部超过文本修饰:下划线

会吗最好始终使用 border-bottom 代替文本修饰:下划线

Would it be good to use border-bottom always in place of text-decoration: underline?

推荐答案

边框底部在元素框的底部放置一行。 text-decoration:underline 呈现带下划线的文本。确切的区别取决于所使用的HTML和文本布局引擎,但是一般来说,如果要在文本上加下划线,请在下划线。

border-bottom puts a line at the bottom of the element box. text-decoration:underline renders the text underlined. The exact difference depends on the HTML and text layout engines in use, but in general if you want text underlined, then underline it.

这篇关于文字装饰:下划线与边框底的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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