什么是“a”字体:0/0 a; [英] What does "a" stand for in font: 0/0 a;
问题描述
我是一个视频教程,设计师使用 font:0/0 a;
替换图片,所以我得到 0
是
font-size
,另一个 0
是
但设计师跳过 a
部分只是说这是一个黑客。
I was referring a video tutorial where the designer used font: 0/0 a;
for image replacement, so I get that 0
is the font-size
, another 0
is the line-height
but designer skips the a
part just by saying that's an hack.
推荐答案
http://nicolasgallagher.com/another-css-image-replacement-technique/
font:0/0 a - 一个缩写字体大小的缩写属性和
line-height。 a值用作非常短的字体族(从该方法的BEM实现获取的概念
)。 CSS验证器
抱怨在速记字体属性中使用0/0无效,但是每个浏览器都接受它,这似乎是
验证器中的错误。使用font:0px / 0 a通过验证,但它在验证器标记为有效的代码中显示为
font:0/0 a。
font:0/0 a – a shorthand property that zeros out the font size and line-height. The a value acts as a very short font-family (an idea taken from the BEM implementation of this method). The CSS validator complains that using 0/0 in the shorthand font property is not valid, but every browser accepts it and this appears to be an error in the validator. Using font:0px/0 a passes validation but it displayed as font:0/0 a in the code that the validator flags as valid.
这篇关于什么是“a”字体:0/0 a;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!