R
R
Romi2021-07-02 22:30:43
css
Romi, 2021-07-02 22:30:43

How to fit an image to the full height of the screen?

I can not get the image to fit completely on the page at the height of the screen.

Help please :)

If possible, in the form of code, and not in the form of words.

Thank you.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
Romi, 2021-07-02
@romicohen

style="height:95vh;"
I found this and it works :)

A
AlexanderShustik, 2021-07-03
@AlexanderShustik

Try object-fit or background-size: cover/contain use vh/vw for iso not true

A
Airat, 2021-07-03
@Airat-2020

img {
    height: 100vh
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question