Created
October 10, 2012 07:56
-
-
Save felixzapata/3863904 to your computer and use it in GitHub Desktop.
CSS media query to target iPad and iPad only
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
/* | |
* http://stackoverflow.com/questions/8271493/css-media-query-to-target-ipad-and-ipad-only | |
*/ | |
@media all and (device-width: 768px) and (device-height: 1024px) and (orientation:portrait) { | |
.ipad-portrait { color: red; } /* your css rules for ipad portrait */ | |
} | |
@media all and (device-width: 768px) and (device-height: 1024px) and (orientation:landscape) { | |
.ipad-landscape { color: blue; } /* your css rules for ipad landscape */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment