Answer the question
In order to leave comments, you need to log in
background: cover doesn't work why?
Good afternoon. I set 3 pictures for the header, the first picture turned out to be stretched by 100%, but cover does not work, even if you set it first. You need to set cover for all 3 pictures. I do not know what to do, I searched in Google and did not find this.
The pictures are perfectly placed, there is just an indentation at the top and bottom. using sass
.header
background: url(../img/header/header-bgc-curtains.png) 100% no-repeat,
url(../img/header/header-bgc.png) right no-repeat,
url(../img/header/header-left-img.jpg) left no-repeat
background-color: #133f58
height: 100vh
width: 100vw
Answer the question
In order to leave comments, you need to log in
In such cases, always separate generic properties into specific ones:
.header {
background-image: url('...'), url('...'), url('...');
background-size: cover, cover, cover;
background-position: left center, right center, center;
background-repeat: no-repeat, no-repeat, no-repeat;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question