Answers for "how to make a background image fit to an element using css"

CSS
10

css background image fit

body {
    background-image:    url(images/background.svg);
    background-size:     cover;                      /* <------ */
    background-repeat:   no-repeat;
    background-position: center center;              /* optional, center the image */
}
Posted by: Guest on April-24-2020

Code answers related to "how to make a background image fit to an element using css"

Browse Popular Code Answers by Language