CSS · Colour and backgrounds

background-image

Paints one or more images or gradients behind content. Layers are comma-separated.

Syntax
background-image: linear-gradient(…), url(…)

Example

Try it

More in this group

accent-color background-clip background-color background-position background-repeat background-size color currentColor

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course