background-image
The CSS property background-image
sets the background image or images of an element. This property can specify two types of images: regular images, such as PNG, JPG, SVG, GIF, and WebP files, or gradients.
Values of background-images
none | url() | inherit
none
– no image
url()
– the path to the background image
Examples
background-image: url("nameofimgae.jpg");
There is also possible to set data URI for the url(), for exmaple:
background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE8AAABPCAYAAACqNJiGAAAgAElEQVR4nI28d1xO....);
Related
- background
- background-image
- background-position
- background-size
- background-repeat
- background-origin
- background-clip
- background-attachment
- background-color