css – “a”代表什么字体:0/0 a;

前端之家收集整理的这篇文章主要介绍了css – “a”代表什么字体:0/0 a;前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我是指一个视频教程,设计师使用font:0/0 a;对于图像替换,所以我得到0是字体大小,另外0是线高,但设计师跳过一个部分只是说这是一个黑客。

那么那究竟在做什么呢?

解决方法

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.

原文链接:https://www.f2er.com/css/219427.html

猜你在找的CSS相关文章