Answer the question
In order to leave comments, you need to log in
How do you customize background images?
Here is the following image:
How to make it the background and center it relative to the screen width?
Obviously, when the screen is wide, then the image is full width, but when the screen gets smaller and smaller, how to make sure that this same cupcake does not climb out of the screen?
And it is desirable, of course, to do this on pure css, but something tells me that js will be needed here
=============================== =================================
PS. Here, of course, this is not very noticeable, but I meant the images are wider and where a certain object is far from the center
Answer the question
In order to leave comments, you need to log in
Well, firstly)
It all depends where you want to insert the background image, that is, it can be, for example, some kind of block or header. Now I'll tell you on the example of header
<body>
<header>
<!--Всё что находится внутри-->
</header
</body
header {
background: url(/*Путь к фото*/) no-repeat center top / cover;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question