Home  >  Article  >  Web Front-end  >  What are the attributes of css images?

What are the attributes of css images?

藏色散人
藏色散人Original
2020-12-08 09:43:287486browse

css image attributes include: 1. background attribute; 2. background-position attribute; 3. background-size attribute; 4. background-position attribute; 5. background-origin attribute, etc.

What are the attributes of css images?

The operating environment of this article: windows10 system, css3, thinkpad t480 computer.

Recommended: "css video tutorial"

In CSS, the background of an element occupies the entire size of the element, including padding and borders, but not the outer edges. distance.

By default, the background image is placed in the upper left corner of the element and repeats horizontally and vertically.

What are the properties of css background images?

background: The background abbreviation attribute can set all background attributes in one statement.

background-position: Specify the position of the background image

The initial background image (original image) is placed according to the value of the background-position attribute.

background-size: Specify the size of the background image

background-repeat: Specify how to repeat the background image

According to the value of the background-repeat attribute, the image can be infinitely tiled. Tile along an axis (x-axis or y-axis), or not tile at all.

background-origin: Specify the positioning area of ​​the background image

background-clip: Specify the painting area of ​​the background image

background-attachment: Set whether the background image is fixed or follows The rest of the page scrolls.

background-image: Specify one or more background images to use

Note: Please set an available background color so that if the background image is not available, the page will still be available Good visual effects.

The above is the detailed content of What are the attributes of css images?. 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