How to achieve background Image Tile with css
This article mainly introduces css how to achieve background picture tiling, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
Let's first take a look at how css sets the tiling of the background image.
Repeat: the default method, completely tiling the background
No-repeat: untiled in both X and Y axes
Repeat-x: tiling background horizontally
Repeat-y: tile the background vertically.
Css background image tiled completely tiled background code:
# content {
Border:1pxsolid#000fff
Height:500px
Background-image:url (https://cache.yisu.com/upload/information/20220117/488/49728.jpg);
Background-repeat:no-repeat
}
The tiling effect of css background image is as follows:
2345 Screenshot 20181008135659.png
The tiles of css background images are not tiled in the X and Y axes:
# content {
Border:1pxsolid#000fff
Height:500px
Background-image:url (images/tu.jpg)
Background-repeat:no-repeat
}
Thank you for reading this article carefully. I hope the article "how to achieve background picture tiling" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and pay attention to the industry information channel. More related knowledge is waiting for you to learn!