A
A
andreyWayne2017-10-27 15:57:09
css
andreyWayne, 2017-10-27 15:57:09

How to properly set up a responsive image according to psd layout?

Hello, I've been struggling with the correct setting of the background image for an hour already. Should I
take a full photo from psd or a cropped one like on the layout?
If I take the full one, then it’s not the same, and also with a truncated one
Please help please
Link
https://yadi.sk/d/kfUn1JM73P8R3U

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Pavlov, 2017-10-27
@lexxpavlov

A similar problem occurs when the aspect ratio changes depending on the viewing mode (window width) - for example, in widescreen mode, the picture is 2:1, and in portrait 1:1, or even the height is greater than the width.
To display such an adaptive image, ideally, you need to prepare several options for the image, for different viewing modes, and show the desired image depending on the media query in css.

A
Alexander Zolotarev, 2017-10-27
@argonavtt

And what prevents you from taking the full and background-position positioning it? If you take a cropped one, then you need to stretch it and the quality will drop.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question