What does “a” stand for in font: 0/0 a;

前端 未结 2 1879
半阙折子戏
半阙折子戏 2021-01-01 10:04

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

2条回答
  •  Happy的楠姐
    2021-01-01 11:05

    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.

提交回复
热议问题