I
I
Igor Pushkarsky2015-07-11 16:43:01
css
Igor Pushkarsky, 2015-07-11 16:43:01

Website layout for retina screens?

Hello!
I blocked the Internet, but I still didn’t understand how best to adapt the site to a retina monitor.
How to specify doubling pixels for background is understandable. And how to specify for pictures that are connected through the IMG tag? For. Svg, as I understand it, nothing needs to be done?
And for ordinary pictures you need to make them 2 options? And change the paths to them through js? With some kind of plugin?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
Dima Pautov, 2015-07-11
@bootd

https://css-tricks.com/snippets/css/retina-display...
https://www.google.ru/webhp?sourceid=chrome-instan...

P
Pashchuk Ilya, 2015-07-11
@IlyaDeveloper

using js, you can simply split the image in half on a non-retina screen, but the image must be loaded with a large set of pixels
, something like this
$(window).load(function() {
var images = $('img');
images.each (function(i) {
$(this).width($(this).width() / 2);
});
});
You can also share using CSS, as an option, you can upload two pictures, but I think it's pointless!
about svg, in principle, yes, but not quite everything depends on how it is used in the code!

C
crossfire, 2015-07-11
@crossfire

retina.js

F
Faber Estello, 2015-07-11
@senselessV7

2 images (which is not good, as for me)
Good explanation with examples
and
+ project

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question