Created
May 7, 2014 23:46
-
-
Save haric/e45d72431edbde4a79ef to your computer and use it in GitHub Desktop.
Mobile web 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
| /* #### Mobile Phones Portrait #### */ | |
| @media screen and (max-device-width: 480px) and (orientation: portrait){ | |
| /* some CSS here */ | |
| } | |
| /* #### Mobile Phones Landscape #### */ | |
| @media screen and (max-device-width: 640px) and (orientation: landscape){ | |
| /* some CSS here */ | |
| } | |
| /* #### Mobile Phones Portrait or Landscape #### */ | |
| @media screen and (max-device-width: 640px){ | |
| /* some CSS here */ | |
| } | |
| /* #### iPhone 4+ Portrait or Landscape #### */ | |
| @media screen and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2){ | |
| /* some CSS here */ | |
| } | |
| /* #### Tablets Portrait or Landscape #### */ | |
| @media screen and (min-device-width: 768px) and (max-device-width: 1024px){ | |
| /* some CSS here */ | |
| } | |
| /* #### Desktops #### */ | |
| @media screen and (min-width: 1024px){ | |
| /* some CSS here */ | |
| } | |
| /* iPads (portrait and landscape) ----------- */ | |
| @media only screen | |
| and (min-device-width : 768px) | |
| and (max-device-width : 1024px) { | |
| /* Styles */ | |
| } | |
| /* iPads (landscape) ----------- */ | |
| @media only screen | |
| and (min-device-width : 768px) | |
| and (max-device-width : 1024px) | |
| and (orientation : landscape) { | |
| /* Styles */ | |
| } | |
| /* iPads (portrait) ----------- */ | |
| @media only screen | |
| and (min-device-width : 768px) | |
| and (max-device-width : 1024px) | |
| and (orientation : portrait) { | |
| /* Styles */ | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment