开发者

What does 14px/26px font size in css do?

开发者 https://www.devze.com 2023-01-02 18:35 出处:网络
I\'ve been inspecting someone elses CSS and I noticed they are doing something I haven\'t seen before...

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: ...
0

精彩评论

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