css - "a"在字体: 0/0 a;中代表什么

标签 css font-size shorthand

我指的是一个视频教程,其中设计师使用 font: 0/0 a; 进行图像替换,所以我得到 0font- size,另一个 0line-height 但设计者跳过 a 部分只是说这是一个 hack。

那么 a 到底做了什么?

最佳答案

http://nicolasgallagher.com/another-css-image-replacement-technique/

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.

关于css - "a"在字体: 0/0 a;中代表什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20640976/

相关文章:

html - html和每个元素通常使用什么字体大小?

javascript 简写 if else 回调

css - 你能想到哪些好的 CSS 速记?

css - CSS 内嵌边框顶部?

html - 有没有办法在不影响元素呈现方式的情况下居中对齐此 span 元素?

c# - HTMLBody 拒绝输出我指定的字体大小,总是以不同的大小结束

css - CSS中的响应字体大小

javascript - Jhipster Angular 4 额外的 CSS 和 JS

css - html css 运行不正常

javascript - 在 JavaScript 中编写此代码的最短方法