We accidentally discovered that when the font and line-height attributes are applied to the same HTML Tag in CSS at the same time, we had to be careful. The writing sequence of the two is different, which may lead to different display effects.
That is:
>>> If you write font first and then line-height, the result is normal.
>>> If line-height is first written and font is written, the effect of line-height definition will be lost. This bug occurs in IE, Firefox, and opera.
For more information, see the following.Code:
<P> H1: </P>
<H1 style = "Background: # f00; margin: 5px 0; Font: bold 20px, Geneva, Arial, sans-serif; line-Height: 40px;"> IECN. net-Focus on web technology and experience development! </H1>
<H1 style = "Background: # f00; margin: 5px 0; line-Height: 40px; Font: bold 20px, Geneva, Arial, sans-serif;"> IECN. net-Focus on web technology and experience development! </H1>
<P> Div: </P>
<Div style = "Background: # f00; margin: 5px 0; Font: bold 20px, Geneva, Arial, sans-serif; line-Height: 40px;"> IECN. net-Focus on web technology and experience development! </Div>
<Div style = "Background: # f00; margin: 5px 0; line-Height: 40px; Font: bold 20px, Geneva, Arial, sans-serif;"> IECN. net-Focus on web technology and experience development! </Div>
Http://www.cnlei.org/blog/article.asp? Id = 343
Note: I read fengyan's message and checked the CSS help document.
Reference
The parameters defined for font must be arranged in the following order. Each parameter can have only one value. If this parameter is ignored, the default value of the independent attribute corresponding to the parameter is 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