css中的font的复合样式的顺序是怎样的

html-css028

css中的font的复合样式的顺序是怎样的,第1张

您好,都可以,都能正确的显示,不限顺序。 一般规定的顺序为:font-style,font-variant,font-weight,font-size,font-family。希望能帮到您!

style 是样式的开始 一个标签内 只能存在一个这样的标签开始

style 里面才是写东西的 variant 没用过

你可以这样写

<spans style="font-size:12pxfont-family:xxxxfont-weight:blod"></span>

这个是没有先后顺序的

font样式简写:

font:[font-style] [font-weight] [font-size] / [font-height] [font-family]

background样式简写:

background:[background-color] [background-image] [background-repeat] [background-position] / [background-size]

border样式简写:

border:[border-width] [border-style] [border-color]

其中font和background的样式属性顺序不可换,且"/"不可忽略,border的样式属性的顺序可任意。