Last active
August 29, 2015 14:08
-
-
Save aFarkas/0d3a0f0e1738b31416b1 to your computer and use it in GitHub Desktop.
add maxdpr option
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- if you have 3dpr choose logo3x.png --> | |
<img src="logo.png" srcset="logo2x.png 200w, logo3x.png 300w" sizes="100px" /> | |
<!-- | |
if you have 3dpr and sizes computes to 100px choose img2.jpg | |
but if you have 2dpr and sizes computes to 150px take img3.jpg | |
--> | |
<img src="img.jpg" srcset="img2.jpg 200w, img3.jpg 300w" maxdpr="2" sizes="100px" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment