reset.css 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. KISSY CSS Reset
  3. 理念:清除和重置是紧密不可分的
  4. 特色:1.适应中文 2.基于最新主流浏览器
  5. 维护:玉伯(lifesinger@gmail.com), 正淳(ragecarrier@gmail.com)
  6. */
  7. /* 清除内外边距 */
  8. body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, /* structural elements 结构元素 */
  9. dl, dt, dd, ul, ol, li, /* list elements 列表元素 */
  10. pre, /* text formatting elements 文本格式元素 */
  11. fieldset, lengend, button, input, textarea, /* form elements 表单元素 */
  12. th, td { /* table elements 表格元素 */
  13. margin: 0;
  14. padding: 0;
  15. }
  16. /* 设置默认字体 */
  17. body,
  18. button, input, select, textarea { /* for ie */
  19. font-size: 12px;
  20. }
  21. h1 { font-size: 18px; /* 18px / 12px = 1.5 */ }
  22. h2 { font-size: 16px; }
  23. h3 { font-size: 14px; }
  24. h4, h5, h6 { font-size: 100%; }
  25. address, cite, dfn, em, var { font-style: normal; } /* 将斜体扶正 */
  26. code, kbd, pre, samp, tt { font-family: "Courier New", Courier, monospace; } /* 统一等宽字体 */
  27. small { font-size: 12px; } /* 小于 12px 的中文很难阅读,让 small 正常化 */
  28. /* 重置列表元素 */
  29. ul, ol { list-style: none; }
  30. /* 重置文本格式元素 */
  31. a { text-decoration: none; }
  32. a:hover { text-decoration: underline; }
  33. abbr[title], acronym[title] { /* 注:1.ie6 不支持 abbr; 2.这里用了属性选择符,ie6 下无效果 */
  34. border-bottom: 1px dotted;
  35. cursor: help;
  36. }
  37. q:before, q:after { content: ''; }
  38. /* 重置表单元素 */
  39. legend { color: #000; } /* for ie6 */
  40. fieldset, img { border: none; } /* img 搭车:让链接里的 img 无边框 */
  41. /* 注:optgroup 无法扶正 */
  42. button, input, select, textarea {
  43. font-size: 100%; /* 使得表单元素在 ie 下能继承字体大小 */
  44. }
  45. /* 重置表格元素 */
  46. table {
  47. border-collapse: collapse;
  48. border-spacing: 0;
  49. }
  50. /* 重置 hr */
  51. hr {
  52. border: 0;
  53. border-top: 1px solid #E2E2E2;
  54. }
  55. /* 让非ie浏览器默认也显示垂直滚动条,防止因滚动条引起的闪烁 */
  56. html { overflow-y: scroll; }