The multiple background images for an element can be put in the HTML page using CSS. Use CSS background property to add multiple background images for an element in any pattern and use other CSS property to set the height and width of the images.
The used background property are listed below:
- background-image: url(), url(), …; This property is used to set one or more background images to the element, separated by commas.
- background-position: right bottom, left top; This property is used to set the position of different images in the page. It set the initial position for each background image.
- background-repeat: no-repeat, repeat; This property is used to set the repetition of the background images. The background image can be repeated along the horizontal and vertical axis.
- background-size: cover|contain|30%|200px 100px; This property is used to set the size of the element background image.
Example 1: Use individual background property to specify the multiple background images.
Example 2: Use background shorthand property to specify the multiple background images.
- How to display multiple horizontal images in Bootstrap card ?
- Difference between background and background-color
- Bootstrap 4 | Images
- HTML | Images
- CSS | Styling Images
- CSS | Border Images
- How to download Google Images using Python
- Responsive images in Bootstrap with Examples
- HTML | DOM images Collection Property
- CSS | Background
- How to set the SVG background color ?
- p5.js | background() function
- CSS | background-origin property
- CSS | background-position Property
- CSS | background-attachment Property
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.