N
N
Nikita2019-03-05 23:27:37
css
Nikita, 2019-03-05 23:27:37

How to make background-image not zoomed?

I am building a website using bootstrap.
I have a class with background-image on one part of the site, and when you enter from the phone, a wild zoom occurs.
How to fix it? so that it looks normal from the desktop and from the phone?
this is how it looks

.MainPage{
    background-image: url(/images/Group\ 2033.jpg);
    background-repeat: round;

}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
KononovD, 2019-03-06
@etozhetisachniy

The zoom is due to the fact that the picture does not fit well in size, obviously)
Ie . it stretches in height, and the browser itself pulls it in width so that the original proportions
are generally preserved,

background: url("pass/to/img") no-repeat center / cover;

should make an acceptable picture)

T
Talyan, 2019-03-05
@flapflapjack

.MainPage{
background: url(/images/Group\ 2033.jpg) no-repeat center;
 background-size: cover;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question