Answers for "background size scale to fit"

CSS
1

stretch background image to fit div

body {
    background-image:url("../images/myImage.jpg");
    background-repeat: no-repeat;
    background-size: 100% 100%;
}
Posted by: Guest on October-03-2021
0

resize background image to size of div

background-size: 300px 150px;
Posted by: Guest on October-01-2021

Code answers related to "background size scale to fit"

Browse Popular Code Answers by Language