Greetings.
How to make so that from any device the initial background was under the height of the device screen as in the example ?
Greetings.
How to make so that from any device the initial background was under the height of the device screen as in the example ?
The question gives rise to endless debates and discussions based not on knowledge, but on opinions. To get an answer, rephrase your question so that it can be given an unambiguously correct answer, or delete the question altogether. If the question can be reformulated according to the rules set out in the certificate , edit it .
I will add the answer user190134 .
If the block is not in the root of the body, then specify the height: 100vh;
It is necessary to give a height of 100%. But remember that the percentage height is taken from the height of the parent. So you need to give height html, body is also 100%
Source: https://ru.stackoverflow.com/questions/588513/
All Articles