Home > Article > Web Front-end > How to set DIV background image background
How to set the background image of DIV? Today we will explain in detail how to set the DIV background image background and how to set the DIV background image.
What does Background mean? It means background when translated. Also in css, as a member of the css attribute, it also has the meaning of background, and it is used to set the background image, background color, background image interception and other styles.
First of all, let’s take a look at the values of background (you can enter the background of the CSS manual to learn more)
You can set the following properties in order (you can click to enter the corresponding CSS manual to view and use):
background-color Background color
background-image Background image
background-repeat Background repeat
background-attachment Is the background image fixed or scrolling
background-position The positioning of the background image
Next we focus Let’s explain the common usage of css background
First let’s look at the following piece of code
background:url(bgimg.gif) no-repeat 5px 5px;
From the picture From the CSS background analysis diagram, we can learn more about how to use the background css attribute.
background:url(bgimg.gif) no-repeat 5px 5px; Such css background expression can save and optimize css file code.
Learners can use and test the various properties of the background to understand and master the css background
How to set the DIV background image background. Friends who need it can save it. Please continue to pay attention to this article. Other updates to the site.
Related reading:
##How to remove the underline of a hyperlink in cssThe above is the detailed content of How to set DIV background image background. For more information, please follow other related articles on the PHP Chinese website!