Home  >  Article  >  Web Front-end  >  Examples of common abbreviations in CSS

Examples of common abbreviations in CSS

怪我咯
怪我咯Original
2017-05-07 11:41:471549browse

1. The background abbreviation attribute sets all background attributes in one declaration:

background-color
background-image
background-repeat
background-attachment
background-position

For example:

background: #444444 urlimage.png) no-repeat fixed top;

2 . The border shorthand property sets all border properties in one declaration:

border-width
border-style
border-color

For example:

border:1px solid red;

3. The font shorthand property sets all font properties in one declaration:

font-style
font-variant
font-weight
font-size/line-height
font-family

For example:

font:italic bold 12px/20px arial,sans-serif;

4. The list-style shorthand attribute sets all list attributes in one statement:

list-style-type
list-style-position
list-style-image

For example:

list-style:square inside url('/images/images.gif');

The above is the detailed content of Examples of common abbreviations in CSS. 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