How to stretch and scale CSS background?

Spread the love

To stretch and scale CSS background, we set the background-size property.

For instance, we write

#my_container {
  background-size: 100% auto;

to set the background-size property to 100% auto; to stretch and scale the border to fill the element.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *