CSS background-image Property


The background-image property sets one or more background images for an element.

By default, a background-image is placed at the top-left corner of an element, and repeated both vertically and horizontally.background-image defines a pointer to an image resource which is to be placed in the background of an element.

Possible Values

  • uri − URL of the image.

  • none − Setting background-image to none means that no background image should be used for matching elements.

  • transparent

CSS Syntax

background-image: url|none|initial|inherit;

Example -