Created
October 24, 2011 17:26
-
-
Save dennisschipper/1309582 to your computer and use it in GitHub Desktop.
Telling media queries apart
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
BODY:before { /** create a box nefore the <body> to hold our stuff **/ | |
display:block; | |
border: 1px solid #c5c5c5; | |
cursor: default; | |
background: #404040; | |
color: #fff; | |
font-size: 0.7em; | |
padding: 5px; | |
margin: 5px; | |
float: right; | |
top: 10px; | |
right: 10px; | |
} | |
@media screen and (min-width: 1024px) { /** Everything from 1024px and over **/ | |
BODY:before { | |
content: "1024 & over"; | |
} | |
} | |
@media screen and (max-width: 1023px) { /** Tablets, everything from 1023px down to 641px**/ | |
BODY:before { | |
content: "Tablets"; | |
} | |
} | |
@media screen and (max-width: 640px) { /** Anything from 0 to 640px, mobile phones etc **/ | |
BODY:before { | |
content: "Mobiles"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment