Created
February 21, 2011 15:44
-
-
Save danott/837231 to your computer and use it in GitHub Desktop.
Target specific touch devices with media queries.
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
| @media only screen and (max-width: 999px) { | |
| /* rules that only apply for canvases narrower than 1000px */ | |
| } | |
| @media only screen and (device-width: 768px) and (orientation: landscape) { | |
| /* rules for iPad in landscape orientation */ | |
| } | |
| @media only screen and (min-device-width: 320px) and (max-device-width: 480px) { | |
| /* iPhone, Android rules here */ | |
| } | |
| @media only screen and (min-device-pixel-ratio: 2) { | |
| /* iPhone4 */ | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I don't think the iPhone4 query works anymore now that there are macbooks with device pixel ratios of 2 (ie, retina display macbook).