Here, we apply a background image to a <div>
element.
Here, we set the background image to background-repeat:no-repeat
. This prevents the image repeating across the element (in the event that the image is smaller than the element). You can also use repeat-x
and repeat-y
to make the background repeat only horizontally or vertically. For more info, see the CSS background-repeat
property.