base.css 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. @charset "utf-8";
  2. /* CSS Document */
  3. @charset "utf-8";
  4. /*!
  5. * @名称:base.css
  6. * @功能:1、重设浏览器默认样式
  7. * 2、设置通用原子类
  8. */
  9. /* 防止用户自定义背景颜色对网页的影响,添加让用户可以自定义字体 */
  10. html {
  11. background: white;
  12. color: black;
  13. }
  14. /* 内外边距通常让各个浏览器样式的表现位置不同 */
  15. body,
  16. div,
  17. dl,
  18. dt,
  19. dd,
  20. ul,
  21. ol,
  22. li,
  23. h1,
  24. h2,
  25. h3,
  26. h4,
  27. h5,
  28. h6,
  29. pre,
  30. code,
  31. form,
  32. fieldset,
  33. legend,
  34. input,
  35. textarea,
  36. p,
  37. blockquote,
  38. th,
  39. td,
  40. hr,
  41. button,
  42. article,
  43. aside,
  44. details,
  45. figcaption,
  46. figure,
  47. footer,
  48. header,
  49. hgroup,
  50. menu,
  51. nav,
  52. section {
  53. margin: 0;
  54. padding: 0;
  55. }
  56. /* 要注意表单元素并不继承父级 font 的问题 */
  57. body,
  58. button,
  59. input,
  60. select,
  61. textarea {
  62. font: 14px \5b8b\4f53, arial, sans-serif;
  63. }
  64. input,
  65. select,
  66. textarea {
  67. font-size: 100%;
  68. }
  69. /* 去掉 table cell 的边距并让其边重合 */
  70. table {
  71. border-collapse: collapse;
  72. border-spacing: 0;
  73. }
  74. /* ie bug:th 不继承 text-align */
  75. th {
  76. text-align: inherit;
  77. }
  78. /* 去除默认边框 */
  79. fieldset,
  80. img {
  81. border: none;
  82. }
  83. /* ie6 7 8(q) bug 显示为行内表现 */
  84. iframe {
  85. display: block;
  86. }
  87. /* 去掉 firefox 下此元素的边框 */
  88. abbr,
  89. acronym {
  90. border: none;
  91. font-variant: normal;
  92. }
  93. /* 一致的 del 样式 */
  94. del {
  95. text-decoration: line-through;
  96. }
  97. address,
  98. caption,
  99. cite,
  100. code,
  101. dfn,
  102. em,
  103. th,
  104. var {
  105. font-style: normal;
  106. font-weight: 500;
  107. }
  108. /* 去掉列表前的标识,li 会继承 */
  109. ol,
  110. ul {
  111. list-style: none;
  112. }
  113. /* 对齐是排版最重要的因素,别让什么都居中 */
  114. caption,
  115. th {
  116. text-align: left;
  117. }
  118. /* 来自yahoo,让标题都自定义,适应多个系统应用 */
  119. h1,
  120. h2,
  121. h3,
  122. h4,
  123. h5,
  124. h6 {
  125. font-size: 100%;
  126. font-weight: 500;
  127. }
  128. q:before,
  129. q:after {
  130. content: '';
  131. }
  132. /* 统一上标和下标 */
  133. sub,
  134. sup {
  135. font-size: 75%;
  136. line-height: 0;
  137. position: relative;
  138. vertical-align: baseline;
  139. }
  140. sup {
  141. top: -0.5em;
  142. }
  143. sub {
  144. bottom: -0.25em;
  145. }
  146. /* 让链接在 hover 状态下显示下划线 */
  147. a:hover {
  148. text-decoration: underline;
  149. }
  150. /* 默认不显示下划线,保持页面简洁 */
  151. ins,
  152. a {
  153. text-decoration: none;
  154. }
  155. /* 去除 ie6 & ie7 焦点点状线 */
  156. a:focus,
  157. *:focus {
  158. outline: none;
  159. }
  160. /* 清除浮动 */
  161. .clearfix:before,
  162. .clearfix:after {
  163. content: "";
  164. display: table;
  165. }
  166. .clearfix:after {
  167. clear: both;
  168. overflow: hidden;
  169. }
  170. .clearfix {
  171. zoom: 1;
  172. /* for ie6 & ie7 */
  173. }
  174. .clear {
  175. clear: both;
  176. display: block;
  177. font-size: 0;
  178. height: 0;
  179. line-height: 0;
  180. overflow: hidden;
  181. }
  182. /* 设置显示和隐藏,通常用来与 js 配合 */
  183. .hide {
  184. display: none;
  185. }
  186. .block {
  187. display: block;
  188. }
  189. /* 设置浮动,减少浮动带来的 bug */
  190. .fl,
  191. .fr {
  192. display: inline;
  193. }
  194. .fl {
  195. float: left;
  196. }
  197. .fr {
  198. float: right;
  199. }