I
I
i_want_to_know_everything2016-01-16 06:37:53
css
i_want_to_know_everything, 2016-01-16 06:37:53

Responsive image so it is possible?

Is this a good solution for responsive images?
What pitfalls can be encountered with this method?
https://jsfiddle.net/f6y2n2rh/
or is it better to replace src via js?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Александр, 2016-01-16
@i_want_to_know_everything

Есть еще srcset. Вот тут можно почитать.
Поддержка браузерами

Владислав Серов, 2016-01-16
@vladseroff

You can also use css, but then you have to make two img blocks and set display: block/none via media.
Solution - https://jsfiddle.net/f6y2n2rh/3/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question