Home >Web Front-end >CSS Tutorial >Caution: CSS code writing order is different, resulting in different display effects_Experience exchange
I accidentally discovered that when applying both the font and line-height attributes in CSS to the same HTML tag, you have to be careful. The writing order of the two is different, which will lead to different display effects.
That is:
>>> If you write font first, then line-height, the display effect will be normal
>>> If you write line-height first, then font, then line The effect defined by -height will be lost. This BUG appears under IE, Firefox, and Opera.
For specific effects, please see the following code: