reset.css 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. /* 清除内外边距 */
  2. body,
  3. h1,
  4. h2,
  5. h3,
  6. h4,
  7. h5,
  8. h6,
  9. hr,
  10. p,
  11. blockquote,
  12. dl,
  13. dt,
  14. dd,
  15. ul,
  16. ol,
  17. li,
  18. pre,
  19. fieldset,
  20. lengend,
  21. button,
  22. input,
  23. textarea,
  24. th,
  25. td {
  26. margin: 0;
  27. padding: 0;
  28. }
  29. /* 设置默认字体 */
  30. body,
  31. button,
  32. input,
  33. select,
  34. textarea {
  35. /* for ie */
  36. /*font: 12px/1 Tahoma, Helvetica, Arial, "宋体", sans-serif;*/
  37. font: 12px/1.3 "Microsoft YaHei", Tahoma, Helvetica, Arial, "\5b8b\4f53", sans-serif;
  38. /* 用 ascii 字符表示,使得在任何编码下都无问题 */
  39. color: #333;
  40. }
  41. h1 {
  42. font-size: 18px;
  43. /* 18px / 12px = 1.5 */
  44. }
  45. h2 {
  46. font-size: 16px;
  47. }
  48. h3 {
  49. font-size: 14px;
  50. }
  51. h4,
  52. h5,
  53. h6 {
  54. font-size: 100%;
  55. }
  56. address,
  57. cite,
  58. dfn,
  59. em,
  60. var,
  61. i {
  62. font-style: normal;
  63. }
  64. /* 将斜体扶正 */
  65. b,
  66. strong {
  67. font-weight: normal;
  68. }
  69. /* 将粗体扶细 */
  70. code,
  71. kbd,
  72. pre,
  73. samp,
  74. tt {
  75. font-family: "Courier New", Courier, monospace;
  76. }
  77. /* 统一等宽字体 */
  78. small {
  79. font-size: 12px;
  80. }
  81. /* 小于 12px 的中文很难阅读,让 small 正常化 */
  82. /* 重置列表元素 */
  83. ul,
  84. ol {
  85. list-style: none;
  86. }
  87. /* 重置文本格式元素 */
  88. a {
  89. text-decoration: none;
  90. color: #666;
  91. }
  92. /* 重置表单元素 */
  93. legend {
  94. color: #000;
  95. }
  96. /* for ie6 */
  97. fieldset,
  98. img {
  99. border: none;
  100. }
  101. button,
  102. input,
  103. select,
  104. textarea {
  105. font-size: 100%;
  106. /* 使得表单元素在 ie 下能继承字体大小 */
  107. }
  108. /* 重置表格元素 */
  109. table {
  110. border-collapse: collapse;
  111. border-spacing: 0;
  112. }
  113. /* 重置 hr */
  114. hr {
  115. border: none;
  116. height: 1px;
  117. }
  118. .clearFix::after {
  119. content: "";
  120. display: block;
  121. clear: both;
  122. }
  123. /* 让非ie浏览器默认也显示垂直滚动条,防止因滚动条引起的闪烁 */
  124. html {
  125. overflow-y: scroll;
  126. }
  127. a:link:hover {
  128. color: rgb(79, 76, 212) !important;
  129. text-decoration: underline;
  130. }
  131. /* 清除浮动 */
  132. .clearfix::after {
  133. display: block;
  134. height: 0;
  135. content: "";
  136. clear: both;
  137. visibility: hidden;
  138. }
  139. /* 针对整个滚动条按钮的设置 */
  140. ::-webkit-scrollbar-button {
  141. display: none;
  142. }
  143. /* 针对滚动条按钮的鼠标悬停状态 */
  144. ::-webkit-scrollbar-button:hover {
  145. display: none;
  146. }
  147. /* 针对滚动条按钮的按下状态 */
  148. ::-webkit-scrollbar-button:active {
  149. display: none;
  150. }