11 ms·
Well, the idea was to do stuff like @media(max-size: 200px) { #container { background: url(tiny_mobile.png); } } @media(max-size: 400px) { #container
by justJanne 11y ago
Well, the idea was to do stuff like
@media(max-size: 200px) { #container { background: url(tiny_mobile.png); } }
@media(max-size: 400px) { #container { background: url(small_mobile.png); } }
@media(max-size: 800px) { #container { background: url(medium_tablet.png); } }
@media(max-size: 2000px) { #container { background: url(large_desktop.png); } }
@media(min-size: 2000px) { #container { background: url(retina.png); } }
Not always loading the same image is a good idea on mobile.
- J_Darnley 11y agoSee my reply elsewhere. Background images are bad meaning this isn't a very compelling argument.
- cbr 11y agoOften these aren't really background images, they're just using that to set image sources via CSS. These days you can do the same thing with srcset, which also allows someone to learn your screen resolution.