CSS background-size

Previous Next

Demo of the different values of the background-size property.

Click the property values below to see the result:

background-size: auto;
background-size: contain;
background-size: cover;
background-size: 50%;
background-size: 30px;
background-size: 60px;
A demonstraion of the different background-size values.
A demonstraion of the different background-size values.
A demonstraion of the different background-size values.
A demonstraion of the different background-size values.
A demonstraion of the different background-size values.
A demonstraion of the different background-size values.

Play more with the code in our Tryit yourself editor: Try it Yourself ❯