Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. 在xxx.html的head加上
  2. ```css
  3. /*
  4. width=device-width :表示宽度是设备屏幕的宽度
  5. initial-scale=1.0:表示初始的缩放比例(几倍)
  6. minimum-scale=1.0:表示最小的缩放比例(几倍)
  7. maximum-scale=1.0:表示最大的缩放比例(几倍)
  8. user-scalable=no:表示用户是否可以调整缩放比例
  9. */
  10. <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  11. ```
  12. 移动端媒体查询的一些尺寸参考
  13. ```css
  14. /*iPhone5/SE */
  15. @media screen and (min-width: 320px) and (max-width: 359px) {
  16. html {
  17. font-size: 12.8px;
  18. }
  19. }
  20. /* Galaxy S5 */
  21. @media screen and (min-width: 360px) and (max-width: 374px) {
  22. html {
  23. font-size: 14.4px;
  24. }
  25. }
  26. /* iPhone6/7/8 iPhoneX*/
  27. @media screen and (min-width: 375px) and (max-width: 385px) {
  28. html {
  29. font-size: 15px;
  30. }
  31. }
  32. @media screen and (min-width: 386px) and (max-width: 392px) {
  33. html {
  34. font-size: 15.44px;
  35. }
  36. }
  37. @media screen and (min-width: 393px) and (max-width: 400px) {
  38. html {
  39. font-size: 16px;
  40. }
  41. }
  42. /* iPhone6/7/8 plus */
  43. @media screen and (min-width: 401px) and (max-width: 414px) {
  44. html {
  45. font-size: 16.48px;
  46. }
  47. }
  48. /*iPad */
  49. @media screen and (min-width: 750px) and (max-width: 800px) {
  50. html {
  51. font-size: 30.72px;
  52. }
  53. }
  54. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement