我应该使用'border:none'还是'border:0'? [英] Should I use 'border: none' or 'border: 0'?
本文介绍了我应该使用'border:none'还是'border:0'?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这两种方法中的哪一种符合W3C标准?
Which of the two methods conforms to W3C standards? Do they both behave as expected across browsers?
border:none;
border:0;
border: none;
border: 0;
推荐答案
两者都有效。你的选择,但我会赞成 border:0
,因为它较短。如果您有很多的流量,您会注意到差异!
Either is valid. Your choice but I would favour border:0
as it's shorter. If you have a lot of traffic, you'll notice the difference!
您似乎担心规格。好,这里是。
You seem to be worried about the specs. Well here they are.
'border'
Value: [ <border-width> || <border-style> || <'border-top-color'> ] | inherit
Initial: see individual properties
Applies to: all elements
Inherited: no
Percentages: N/A
Media: visual
Computed value: see individual properties
值清楚地说明您可以使用宽度/样式/颜色的任意组合。在这种情况下,您只需要设置一个。 0
设置宽度,无
样式。
The value clearly states that you can use any combination of width/style/colour. In this case you only need to set one. 0
sets the width, none
the style.
这篇关于我应该使用'border:none'还是'border:0'?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文