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
- CSS | Styling Images
- HTML | Images
- Bootstrap 4 | Images
- CSS | Border Images
- How to put images in a box without space using Bootstrap?
- HTML | DOM images Collection Property
- How to download Google Images using Python
- How to use grid for images in bootstrap card ?
- Responsive images in Bootstrap with Examples
- Why card images use data-src (not src) for image in Bootstrap 4 ?
- Python - Process images of a video using OpenCV
- CSS | Background
- p5.js | background() function
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.