How to clear background picture duplicates by css
This article mainly shows you "css how to remove background picture repetition", the content is easy to understand, clear, hope to help you solve doubts, the following let the editor lead you to study and learn "css how to remove background picture repetition" this article.
In css, you can use the background-repeat property to clear the background image duplicates, just set the value of this property to "no-repeat" to specify that the background image will not be repeated, that is, the background image will be displayed only once; syntax "background-repeat:no-repeat;".
The operating environment of this tutorial: windows7 system, CSS3&&HTML5 version, Dell G3 computer.
When css uses the background-image attribute to set the background image, sometimes repeated tiling occurs because of the image size problem:
Div {width: 500px; height: 500px; border: 2px solid red; background-image: url (img/nz.png);}
So how do you clear the repetition of the background picture so that it shows only one? This requires the use of the background-repeat attribute.
The background-repeat property is used to set whether and how to repeat the background image. When the value is "no-repeat", you can specify that the background image is not repeated, that is, the background image will be displayed only once.
Div {width: 500px; height: 500px; border: 2px solid red; background-image: url (img/nz.png); background-repeat: no-repeat;}
The above is all the content of the article "how to clear the background picture repetition of css". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!