Home  >  Article  >  Web Front-end  >  How to use css background-image property

How to use css background-image property

藏色散人
藏色散人Original
2019-05-29 10:13:354508browse

css background-image attribute sets the background image for the element. The syntax is: background-image:url (image path). The background image you set takes up the full size of the element, including padding and borders, but not margins.

How to use css background-image property

#How to use the css background-image property?

Function: Set the background image for the element.

Note: The background of an element occupies the entire size of the element, including padding and borders, but not including margins. By default, the background image is placed in the upper left corner of the element and repeats horizontally and vertically.

Note: The attribute value "inherit" is not supported in any version of Internet Explorer (including IE8).

css background-image property usage example





Effect output:

How to use css background-image property

The above is the detailed content of How to use css background-image property. 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