I want to make a div welcome
have the same background image as the body but inverted(1)
around the div. Like stretching the background image of the div to the whole page while displaying the background only around the dimensions of said div.
Expectation: expected div background
I tried background-size: cover
in the div expecting it to cover the whole page, but it covers the whole div instead.
Code for div:
.welcome {
background-image: url("bg.jpg");
filter: invert(1);
background-size: cover;
}
The body
had the same background image as welcome
div with the following properties:
background-repeat: no-repeat;
width: 100vw;
height: 100vh;
background-size: cover;
position: fixed;
margin: auto;
Real output: output with my current code
div { background ...
to be normal and thebody { background ...
to be inverted? The reverse of what you have?