开发者

One css declaration for all css font properties

What is the proper syntax for putting all css font properties into one value.

body {font: 12px, arial, red}
开发者_如何学Go

Something like that but with all the selectors and properties.


body{
    font: bold italic 15px/20px arial,sans-serif;
    color: red;
}

http://www.w3schools.com/css/tryit.asp?filename=trycss_font

you can't include the color as part of the declaration. 15px/20px = font-size/line-height

One css declaration for all css font properties

nice link, maegar!


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

Source: http://www.w3.org/TR/CSS2/fonts.html#font-shorthand


http://www.w3.org/TR/CSS2/fonts.html

For a tutorial:

http://www.w3schools.com/css/pr_font_font.asp

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜