Advertisement
tommyosheawebdesign

CSS Media Queries

May 6th, 2020
1,378
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 4.65 KB | None | 0 0
  1. /* Smartphones (portrait and landscape) ----------- */
  2. @media only screen and (min-device-width : 320px) and (max-device-width : 480px) {
  3. /* Styles */
  4. }
  5.  
  6. /* Smartphones (landscape) ----------- */
  7. @media only screen and (min-width : 321px) {
  8. /* Styles */
  9. }
  10.  
  11. /* Smartphones (portrait) ----------- */
  12. @media only screen and (max-width : 320px) {
  13. /* Styles */
  14. }
  15.  
  16. /* iPads (portrait and landscape) ----------- */
  17. @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) {
  18. /* Styles */
  19. }
  20.  
  21. /* iPads (landscape) ----------- */
  22. @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape) {
  23. /* Styles */
  24. }
  25.  
  26. /* iPads (portrait) ----------- */
  27. @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : portrait) {
  28. /* Styles */
  29. }
  30. /**********
  31. iPad 3
  32. **********/
  33. @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape) and (-webkit-min-device-pixel-ratio : 2) {
  34. /* Styles */
  35. }
  36.  
  37. @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : portrait) and (-webkit-min-device-pixel-ratio : 2) {
  38. /* Styles */
  39. }
  40. /* Desktops and laptops ----------- */
  41. @media only screen  and (min-width : 1224px) {
  42. /* Styles */
  43. }
  44.  
  45. /* Large screens ----------- */
  46. @media only screen  and (min-width : 1824px) {
  47. /* Styles */
  48. }
  49.  
  50. /* iPhone 4 ----------- */
  51. @media only screen and (min-device-width : 320px) and (max-device-width : 480px) and (orientation : landscape) and (-webkit-min-device-pixel-ratio : 2) {
  52. /* Styles */
  53. }
  54.  
  55. @media only screen and (min-device-width : 320px) and (max-device-width : 480px) and (orientation : portrait) and (-webkit-min-device-pixel-ratio : 2) {
  56. /* Styles */
  57. }
  58.  
  59. /* iPhone 5 ----------- */
  60. @media only screen and (min-device-width: 320px) and (max-device-height: 568px) and (orientation : landscape) and (-webkit-device-pixel-ratio: 2){
  61. /* Styles */
  62. }
  63.  
  64. @media only screen and (min-device-width: 320px) and (max-device-height: 568px) and (orientation : portrait) and (-webkit-device-pixel-ratio: 2){
  65. /* Styles */
  66. }
  67.  
  68. /* iPhone 6, 7, 8 ----------- */
  69. @media only screen and (min-device-width: 375px) and (max-device-height: 667px) and (orientation : landscape) and (-webkit-device-pixel-ratio: 2){
  70. /* Styles */
  71. }
  72.  
  73. @media only screen and (min-device-width: 375px) and (max-device-height: 667px) and (orientation : portrait) and (-webkit-device-pixel-ratio: 2){
  74. /* Styles */
  75. }
  76.  
  77. /* iPhone 6+, 7+, 8+ ----------- */
  78. @media only screen and (min-device-width: 414px) and (max-device-height: 736px) and (orientation : landscape) and (-webkit-device-pixel-ratio: 2){
  79. /* Styles */
  80. }
  81.  
  82. @media only screen and (min-device-width: 414px) and (max-device-height: 736px) and (orientation : portrait) and (-webkit-device-pixel-ratio: 2){
  83. /* Styles */
  84. }
  85.  
  86. /* iPhone X ----------- */
  87. @media only screen and (min-device-width: 375px) and (max-device-height: 812px) and (orientation : landscape) and (-webkit-device-pixel-ratio: 3){
  88. /* Styles */
  89. }
  90.  
  91. @media only screen and (min-device-width: 375px) and (max-device-height: 812px) and (orientation : portrait) and (-webkit-device-pixel-ratio: 3){
  92. /* Styles */
  93. }
  94.  
  95. /* iPhone XS Max, XR ----------- */
  96. @media only screen and (min-device-width: 414px) and (max-device-height: 896px) and (orientation : landscape) and (-webkit-device-pixel-ratio: 3){
  97. /* Styles */
  98. }
  99.  
  100. @media only screen and (min-device-width: 414px) and (max-device-height: 896px) and (orientation : portrait) and (-webkit-device-pixel-ratio: 3){
  101. /* Styles */
  102. }
  103.  
  104. /* Samsung Galaxy S3 ----------- */
  105. @media only screen and (min-device-width: 320px) and (max-device-height: 640px) and (orientation : landscape) and (-webkit-device-pixel-ratio: 2){
  106. /* Styles */
  107. }
  108.  
  109. @media only screen and (min-device-width: 320px) and (max-device-height: 640px) and (orientation : portrait) and (-webkit-device-pixel-ratio: 2){
  110. /* Styles */
  111. }
  112.  
  113. /* Samsung Galaxy S4 ----------- */
  114. @media only screen and (min-device-width: 320px) and (max-device-height: 640px) and (orientation : landscape) and (-webkit-device-pixel-ratio: 3){
  115. /* Styles */
  116. }
  117.  
  118. @media only screen and (min-device-width: 320px) and (max-device-height: 640px) and (orientation : portrait) and (-webkit-device-pixel-ratio: 3){
  119. /* Styles */
  120. }
  121.  
  122. /* Samsung Galaxy S5 ----------- */
  123. @media only screen and (min-device-width: 360px) and (max-device-height: 640px) and (orientation : landscape) and (-webkit-device-pixel-ratio: 3){
  124. /* Styles */
  125. }
  126.  
  127. @media only screen and (min-device-width: 360px) and (max-device-height: 640px) and (orientation : portrait) and (-webkit-device-pixel-ratio: 3){
  128. /* Styles */
  129. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement