What are the attributes of css images?

藏色散人
Release: 2023-01-04 09:36:37
Original
7421 people have browsed it

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!

Related labels:
css
source:php.cn
Statement of this Website
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!