reset.scss 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. *,
  2. ::before,
  3. ::after {
  4. box-sizing: border-box;
  5. border-color: currentcolor;
  6. border-style: solid;
  7. border-width: 0;
  8. }
  9. #app {
  10. width: 100%;
  11. height: 100%;
  12. }
  13. html {
  14. box-sizing: border-box;
  15. width: 100%;
  16. height: 100%;
  17. line-height: 1.5;
  18. tab-size: 4;
  19. text-size-adjust: 100%;
  20. }
  21. body {
  22. width: 100%;
  23. height: 100%;
  24. margin: 0;
  25. overflow: hidden;
  26. font-family: "HarmonyOS_Sans_Light", "Helvetica Neue", Helvetica,
  27. "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial,
  28. sans-serif;
  29. line-height: inherit;
  30. -moz-osx-font-smoothing: grayscale;
  31. -webkit-font-smoothing: antialiased;
  32. text-rendering: optimizelegibility;
  33. }
  34. a {
  35. color: inherit;
  36. text-decoration: inherit;
  37. }
  38. img,
  39. svg {
  40. display: inline-block;
  41. }
  42. svg {
  43. // 因icon大小被设置为和字体大小一致,而span等标签的下边缘会和字体的基线对齐,故需设置一个往下的偏移比例,来纠正视觉上的未对齐效果
  44. vertical-align: -0.15em;
  45. }
  46. ul,
  47. li {
  48. padding: 0;
  49. margin: 0;
  50. list-style: none;
  51. }
  52. *,
  53. *::before,
  54. *::after {
  55. box-sizing: inherit;
  56. }
  57. a,
  58. a:focus,
  59. a:hover {
  60. color: inherit;
  61. text-decoration: none;
  62. cursor: pointer;
  63. }
  64. a:focus,
  65. a:active,
  66. div:focus {
  67. outline: none;
  68. }