I've been inspecting someone elses CSS and I noticed they are doing something I haven't seen before...
body {font:14px/26开发者_如何学编程px "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif}
What does the 14px/26px do? I've tried to google it but nothing seems to come up.
According to the CSS 2.1 Specifications for the font
shorthand property:
15.8 Shorthand font property: the 'font' property
'font'
Value: [ [ <'font-style'> || <'font-variant'> || <'font-weight'> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'> ] | caption | icon | menu | message-box | small-caption | status-bar | inherit
The first value is the font-size
value, and the second value is the line-height
value.
So font: 14px/26px ...
means:
font-size: 14px;
line-height: 26px;
font-family: ...
精彩评论