CSS:
body{
background-image:url("img-address");
}
I want the image not to repeat itself multiple times, but to span the entire screen. I don't want to use a normal image I want to use background-image
.
CSS:
body{
background-image:url("img-address");
}
I want the image not to repeat itself multiple times, but to span the entire screen. I don't want to use a normal image I want to use background-image
.
you can use background-size
:
https://www.w3schools.com/cssref/css3_pr_background-size.asp
body {
background-size: 100% 100% ;
}
or
body {
background-size: cover;
}
Try to use background-size: cover;
as described in this article: https://css-tricks.com/perfect-full-page-background-image/
It will make the image stretch to fill the available space and scale accordingly to the size of its container.
Let me know how it goes :)
You can use the following to make it fit:
background-size:cover; Resize the background image to cover the entire container, even if it has to stretch the image or cut a little bit off one of the edges
background-size:contain; Resize the background image to make sure the image is fully visible
So it does not repeat: background-repeat: no-repeat;
https://www.w3schools.com/cssref/css3_pr_background-size.asp