Home > Article > Web Front-end > Can the font attribute in css be out of order?
The font attributes in css cannot be out of order, that is, the font attributes must be written in order; css font specifies all font attributes in a statement; the attributes that can be set in order are "font-style font-variant font-weight font-size...".
The operating environment of this tutorial: Windows 7 system, css3 version, DELL G3 computer.
Recommended: css video tutorial
Can the font attributes in css be out of order?
No, the font attributes must be written in order.
Some of the composite attributes in CSS can be out of order, and some can't. The order of borders can be messed up, but the order of fonts cannot be messed up.
font shorthand property sets all font properties in one declaration.
You can set the following attributes in order:
font-style font-variant font-weight font-size/line-height font-family
You don’t need to set one of the values, such as font:100% verdana; is also allowed. Properties that are not set use their default values.
The above is the detailed content of Can the font attribute in css be out of order?. For more information, please follow other related articles on the PHP Chinese website!