reset.css 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /** 清除内外边距 **/
  2. body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, /* structural elements 结构元素 */
  3. dl, dt, dd, ul, ol, li, /* list elements 列表元素 */
  4. pre, /* text formatting elements 文本格式元素 */
  5. form, fieldset, legend, button, input, textarea, /* form elements 表单元素 */
  6. th, td /* table elements 表格元素 */ {
  7. margin: 0;
  8. padding: 0;
  9. }
  10. /** 设置默认字体 **/
  11. body,
  12. button, input, select, textarea /* for ie */ {
  13. font: 12px/1.5 tahoma, arial, \5b8b\4f53, sans-serif;
  14. }
  15. h1, h2, h3, h4, h5, h6 { font-size: 100%; }
  16. address, cite, dfn, em, var { font-style: normal; } /* 将斜体扶正 */
  17. code, kbd, pre, samp { font-family: courier new, courier, monospace; } /* 统一等宽字体 */
  18. small { font-size: 12px; } /* 小于 12px 的中文很难阅读,让 small 正常化 */
  19. /** 重置列表元素 **/
  20. ul, ol { list-style: none; }
  21. /** 重置文本格式元素 **/
  22. a { text-decoration: none; }
  23. a:hover { text-decoration: underline; }
  24. sup { vertical-align: text-top; } /* 重置,减少对行高的影响 */
  25. sub { vertical-align: text-bottom; }
  26. /** 重置表单元素 **/
  27. legend { color: #000; } /* for ie6 */
  28. fieldset, img { border: 0; } /* img 搭车:让链接里的 img 无边框 */
  29. button, input, select, textarea { font-size: 100%; } /* 使得表单元素在 ie 下能继承字体大小 */
  30. /* 注:optgroup 无法扶正 */
  31. /** 重置表格元素 **/
  32. table {border-collapse: collapse; border-spacing: 0; }