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 and then line-height, the display effect will be normal
>>> If you write line-height first and then font, the effect defined by line-height will be Lost, this BUG appears under IE, Firefox, and Opera
Please see the following code for the specific effect:
h1:
IECN.Net - Focus on Web technology and experience the fun of development!
IECN.Net - Focus on Web Technology, experience the fun of development!
div:
IECN.Net - Focus on Web technology and experience the fun of development!
IECN.Net - Focus on Web Technology, experience the fun of development!
Original text: http://www.cnlei.org/blog/article.asp?id=343
Note: After reading Fengyan’s message, go Check the CSS help document
Quote
The definition parameters of font must be arranged in the following order. Only one value is allowed per parameter. If ignored, the default value of the independent property corresponding to its parameter will be used:
font : font-style || font-variant || font-weight || font-size || line-height || font-family
Example: p { font: italic small-caps 600 12pts/18pts 宋体; }
Author: ztu
http://www.dnew.cn/post/217.htm#topreply