reset.css 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. /*CSS Reset*/
  2. body,
  3. div,
  4. dl,
  5. dt,
  6. dd,
  7. ul,
  8. ol,
  9. li,
  10. h1,
  11. h2,
  12. h3,
  13. h4,
  14. h5,
  15. h6,
  16. pre,
  17. code,
  18. form,
  19. fieldset,
  20. legend,
  21. input,
  22. textarea,
  23. p,
  24. blockquote,
  25. th,
  26. td,
  27. header,
  28. hgroup,
  29. nav,
  30. section,
  31. article,
  32. aside,
  33. footer,
  34. figure,
  35. figcaption,
  36. menu,
  37. button {
  38. margin: 0;
  39. padding: 0;
  40. border: 0;
  41. outline: 0;
  42. /* 仅根据font-size属性决定字体大小。 */
  43. font-size-adjust: none;
  44. /* 切换横竖屏或者用户自己通过浏览器设置的话,可以改变字体的大小 */
  45. -webkit-text-size-adjust: 100%!important;
  46. /* 禁止长按弹出系统菜单 */
  47. -webkit-touch-callout: none;
  48. }
  49. body {
  50. font-family: "Helvetica","Microsoft Yahei","Helvetica Neue", Helvetica, STHeiTi, sans-serif;
  51. line-height: 1.5;
  52. font-size: 16px;
  53. color: #333333;
  54. background-color: #ffffff;
  55. /* 禁止用户选中文字 */
  56. -webkit-user-select: none;
  57. /* 切换横竖屏或者用户自己通过浏览器设置的话,可以改变字体的大小 */
  58. -webkit-text-size-adjust: 100%;
  59. /* 去除android下a/button/input标签被点击时产生的边框 & 去除ios下a标签被点击时产生的半透明灰色背景 */
  60. -webkit-tap-highlight-color: transparent;
  61. outline: 0;
  62. }
  63. h1,
  64. h2,
  65. h3,
  66. h4,
  67. h5,
  68. h6 {
  69. font-weight: normal;
  70. }
  71. table {
  72. border-collapse: collapse;
  73. border-spacing: 0;
  74. }
  75. caption,
  76. th {
  77. text-align: left;
  78. }
  79. fieldset,
  80. img {
  81. border: 0;
  82. }
  83. li {
  84. list-style: none;
  85. }
  86. ins {
  87. text-decoration: none;
  88. }
  89. del {
  90. text-decoration: line-through;
  91. }
  92. input,
  93. button,
  94. textarea,
  95. select,
  96. optgroup,
  97. option {
  98. font-family: inherit;
  99. font-size: inherit;
  100. font-style: inherit;
  101. font-weight: inherit;
  102. outline: 0;
  103. }
  104. button {
  105. /* button在iOS有个默认背景 */
  106. -webkit-appearance: none;
  107. border: 0;
  108. background: none;
  109. }
  110. a {
  111. /* 禁止长按弹出系统菜单 */
  112. -webkit-touch-callout: none;
  113. text-decoration: none;
  114. }
  115. :focus {
  116. outline: 0;
  117. /* 标签被点击时产生的边框 */
  118. -webkit-tap-highlight-color: transparent;
  119. }
  120. em,
  121. i {
  122. font-style: normal;
  123. }