开发者

What does this size mean in css {font: 14px/24px Arial, Helvetica, sans-serif}

What is 14px/24px here开发者_Go百科? Which is the real font size?


It's the shorthand for the different font related properties. It means:

font-size: 14px;
line-height: 24px;

font-family: Arial, Helvetica, sans-serif

See: http://www.impressivewebs.com/css-font-shorthand-property-cheat-sheet/

What does this size mean in css {font: 14px/24px Arial, Helvetica, sans-serif}


First is font-size the second is line-height

Quote from the specification for font shorthand

'font'
Value: [ [ <'font-style'> || <'font-variant'> || <'font-weight'> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'> ] | caption | icon | menu | message-box | small-caption | status-bar | inherit


This is equivalent to

#html{
    font-size:14px;
    line-height:24px;
    font-family: Arial, Helvetica, sans-serif;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜