reset.css 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /* 清除内外边距 */
  2. body, h1, h2, h3, h4, h5, h6, hr, p, blockquote,
  3. dl, dt, dd, ul, ol, li,
  4. pre,
  5. fieldset, lengend, button, input, textarea,
  6. th, td {
  7. margin: 0;
  8. padding: 0;
  9. }
  10. /* 设置默认字体 */
  11. body,
  12. button, input, select, textarea { /* for ie */
  13. /*font: 12px/1 Tahoma, Helvetica, Arial, "宋体", sans-serif;*/
  14. font: 12px/1.3 "Microsoft YaHei",Tahoma, Helvetica, Arial, "\5b8b\4f53", sans-serif; /* 用 ascii 字符表示,使得在任何编码下都无问题 */
  15. color: #333;
  16. }
  17. h1 { font-size: 18px; /* 18px / 12px = 1.5 */ }
  18. h2 { font-size: 16px; }
  19. h3 { font-size: 14px; }
  20. h4, h5, h6 { font-size: 100%; }
  21. address, cite, dfn, em, var, i{ font-style: normal; } /* 将斜体扶正 */
  22. b, strong{ font-weight: normal; } /* 将粗体扶细 */
  23. code, kbd, pre, samp, tt { font-family: "Courier New", Courier, monospace; } /* 统一等宽字体 */
  24. small { font-size: 12px; } /* 小于 12px 的中文很难阅读,让 small 正常化 */
  25. /* 重置列表元素 */
  26. ul, ol { list-style: none; }
  27. /* 重置文本格式元素 */
  28. a { text-decoration: none; color: #666;}
  29. /* 重置表单元素 */
  30. legend { color: #000; } /* for ie6 */
  31. fieldset, img { border: none; }
  32. button, input, select, textarea {
  33. font-size: 100%; /* 使得表单元素在 ie 下能继承字体大小 */
  34. }
  35. /* 重置表格元素 */
  36. table {
  37. border-collapse: collapse;
  38. border-spacing: 0;
  39. }
  40. /* 重置 hr */
  41. hr {
  42. border: none;
  43. height: 1px;
  44. }
  45. .clearFix::after{
  46. content:"";
  47. display: block;
  48. clear:both;
  49. }
  50. /* 让非ie浏览器默认也显示垂直滚动条,防止因滚动条引起的闪烁 */
  51. html { overflow-y: scroll; }
  52. a:link:hover{
  53. color : rgb(79, 76, 212) !important;
  54. text-decoration: underline;
  55. }
  56. /* 清除浮动 */
  57. .clearfix::after {
  58. display: block;
  59. height: 0;
  60. content: "";
  61. clear: both;
  62. visibility: hidden;
  63. }