Created
November 4, 2015 16:05
-
-
Save b1nary/bfa92344c54c2b71ffca to your computer and use it in GitHub Desktop.
Collecting User Browser Display dimensions with CSS.
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
@media screen and (max-width: 1px){ #dummy { background:url(/endpoint/width/1); } } | |
@media screen and (max-width: 2px){ #dummy { background:url(/endpoint/width/2); } } | |
@media screen and (max-width: 3px){ #dummy { background:url(/endpoint/width/3); } } | |
@media screen and (max-width: 4px){ #dummy { background:url(/endpoint/width/4); } } | |
/* More */ | |
@media screen and (max-width: 50px){ #dummy { background:url(/endpoint/width/50); } } | |
/* More */ | |
@media screen and (max-width: 1280px){ #dummy { background:url(/endpoint/width/1280); } } | |
/* and then repeat same for height. Note that resizing the browser windows might creates additional requests */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment