Home  >  Article  >  Web Front-end  >  Can the font attribute in css be out of order?

Can the font attribute in css be out of order?

藏色散人
藏色散人Original
2021-01-25 09:15:103873browse

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...".

Can the font attribute in css be out of order?

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn