1. @media all and (min-width:320px) and (max-width:640px) {
  2. }

常用设备设置

  1. /* ----------- iPhone 4 and 4S ----------- */
  2. /* Portrait and Landscape */
  3. @media only screen
  4. and (min-device-width: 320px)
  5. and (max-device-width: 480px)
  6. and (-webkit-min-device-pixel-ratio: 2) {
  7. }
  8. /* Portrait */
  9. @media only screen
  10. and (min-device-width: 320px)
  11. and (max-device-width: 480px)
  12. and (-webkit-min-device-pixel-ratio: 2)
  13. and (orientation: portrait) {
  14. }
  15. /* Landscape */
  16. @media only screen
  17. and (min-device-width: 320px)
  18. and (max-device-width: 480px)
  19. and (-webkit-min-device-pixel-ratio: 2)
  20. and (orientation: landscape) {
  21. }
  22. /* ----------- iPhone 5 and 5S ----------- */
  23. /* Portrait and Landscape */
  24. @media only screen
  25. and (min-device-width: 320px)
  26. and (max-device-width: 568px)
  27. and (-webkit-min-device-pixel-ratio: 2) {
  28. }
  29. /* Portrait */
  30. and (min-device-width: 320px)
  31. and (max-device-width: 568px)
  32. and (-webkit-min-device-pixel-ratio: 2)
  33. }
  34. /* Landscape */
  35. @media only screen
  36. and (min-device-width: 320px)
  37. and (max-device-width: 568px)
  38. and (-webkit-min-device-pixel-ratio: 2)
  39. and (orientation: landscape) {
  40. }
  41. /* ----------- iPhone 6 ----------- */
  42. /* Portrait and Landscape */
  43. @media only screen
  44. and (min-device-width: 375px)
  45. and (max-device-width: 667px)
  46. and (-webkit-min-device-pixel-ratio: 2) {
  47. }
  48. /* Portrait */
  49. @media only screen
  50. and (min-device-width: 375px)
  51. and (max-device-width: 667px)
  52. and (-webkit-min-device-pixel-ratio: 2)
  53. and (orientation: portrait) {
  54. }
  55. /* Landscape */
  56. @media only screen
  57. and (min-device-width: 375px)
  58. and (max-device-width: 667px)
  59. and (-webkit-min-device-pixel-ratio: 2)
  60. and (orientation: landscape) {
  61. }
  62. /* ----------- iPhone 6+ ----------- */
  63. /* Portrait and Landscape */
  64. @media only screen
  65. and (max-device-width: 736px)
  66. }
  67. /* Portrait */
  68. @media only screen
  69. and (min-device-width: 414px)
  70. and (max-device-width: 736px)
  71. and (-webkit-min-device-pixel-ratio: 3)
  72. and (orientation: portrait) {
  73. }
  74. /* Landscape */
  75. @media only screen
  76. and (min-device-width: 414px)
  77. and (max-device-width: 736px)
  78. and (-webkit-min-device-pixel-ratio: 3)
  79. and (orientation: landscape) {
  80. }
  1. /* ----------- HTC One ----------- */
  2. /* Portrait and Landscape */
  3. @media screen
  4. and (device-width: 360px)
  5. and (device-height: 640px)
  6. and (-webkit-device-pixel-ratio: 3) {
  7. }
  8. /* Portrait */
  9. @media screen
  10. and (device-width: 360px)
  11. and (device-height: 640px)
  12. and (-webkit-device-pixel-ratio: 3)
  13. and (orientation: portrait) {
  14. }
  15. /* Landscape */
  16. @media screen
  17. and (device-width: 360px)
  18. and (device-height: 640px)
  19. and (-webkit-device-pixel-ratio: 3)
  20. and (orientation: landscape) {
  21. }