Created
August 10, 2011 00:58
-
-
Save Lobstrosity/1135710 to your computer and use it in GitHub Desktop.
CSS Media Queries
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
<head> | |
<link rel="stylesheet" href="base.css" /> | |
<link rel="stylesheet" href="mobile.css" media="max-width: 320px" /> | |
<!-- OR --> | |
<style type="text/css"> | |
/* base styles go here */ | |
@media (max-width: 320px) | |
{ | |
/* mobile styles go here */ | |
} | |
</style> | |
</head> |
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
<!-- Common styles --> | |
<link rel="stylesheet" href="base.css" /> | |
<!-- For tiny (most likely mobile) browsers --> | |
<link rel="stylesheet" href="small.css" media="max-width: 320px" /> | |
<!-- For small desktop or large mobile browsers --> | |
<link rel="stylesheet" href="medium.css" | |
media="min-width: 321px and max-width: 799px" /> | |
<!-- Most desktop browsers --> | |
<link rel="stylesheet" href="large.css" media="min-width: 800px" /> |
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
<meta name="viewport" content="width=device-width" /> |
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
#wrapper | |
{ | |
-webkit-transition: width 0.2s ease-in-out; | |
-moz-transition: width 0.2s ease-in-out; | |
-o-transition: width 0.2s ease-in-out; | |
transition: width 0.2s ease-in-out; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment