将所有css字体属性放入一个值的正确语法是什么。
body {font: 12px, arial, red}
类似的东西,但包含所有选择器和属性。
答案 0 :(得分:41)
body{
font: bold italic 15px/20px arial,sans-serif;
color: red;
}
http://www.w3schools.com/css/tryit.asp?filename=trycss_font
您不能将颜色包含在声明中。 15px / 20px = font-size / line-height
很好的链接,maegar!答案 1 :(得分:4)
font: [ [ <'font-style'> || <'font-variant'> || <'font-weight'> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'> ] | caption | icon | menu | message-box | small-caption | status-bar | inherit
答案 2 :(得分:1)