Answer the question
In order to leave comments, you need to log in
How to make the background fill the entire screen of the document?
Guys, tell me how to make the background fill the entire screen of the document. Those. Do you have an image that needs to be stretched across the entire document?
PS
And tell me how to more or less competently cut a picture for such a background.
Answer the question
In order to leave comments, you need to log in
background-size: [ <value> | <interest> | auto ]{1,2} | cover | contain
<value> - Sets the size in any units available for CSS - pixels (px), centimeters (cm), em, etc.
<percentage> - Sets the size of the background image as a percentage of the width or height of the element.
auto - If both width and height are specified (auto auto), background dimensions remain original; if only for one side of the picture (100px auto), then the size is calculated automatically based on the proportions of the picture.
cover - Scales the image proportionally so that its width or height equals the width or height of the box.
contain - Scales the image while maintaining aspect ratio so that the entire image fits inside the block.
If you have questions like this, go to htmlbook.ru, and see everything that starts with background in the CSS reference section.
This will save time for both you and us.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question