Created
April 30, 2012 13:45
-
-
Save keriati/2558487 to your computer and use it in GitHub Desktop.
I have no idea...
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
<style type="text/css"> | |
@media all and (max-width: 640px) { | |
body:after { | |
content: 'small'; | |
display: none; | |
} | |
} | |
@media all and (min-width: 641px) { | |
body:after { | |
content: 'big'; | |
display: none; | |
} | |
} | |
</style> | |
</head> | |
<body> | |
<h1>Screen size is:</h1> | |
<p id="target"></p> | |
<script type="text/javascript"> | |
(function() { | |
window.mqsize = window.getComputedStyle(document.body,':after').getPropertyValue('content'); | |
document.getElementById('target').innerHTML = window.mqsize; | |
}()) | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment