Browse Source

fix:字体bug

luoy 1 day ago
parent
commit
b90e5e952b
2 changed files with 16 additions and 3 deletions
  1. 15 1
      css/base.css
  2. 1 2
      static/index/css/main.css

+ 15 - 1
css/base.css

@@ -1,3 +1,17 @@
+@font-face {
+    font-family: 'NumberFont';
+    src: url('/static/index/font/poppins/Poppins-Bold.woff') format('woff'),
+         url('/static/index/font/poppins/Poppins-Medium.woff') format('woff'),
+         url('/static/index/font/poppins/Poppins-Regular.woff') format('woff');
+    unicode-range: U+30-39; /* 只针对数字0-9 */
+}
+@font-face {
+    font-family: 'syht';
+    src: url('/static/index/font/syht/SourceHanSansSC-Bold-2.woff') format('woff'),
+    url('/static/index/font/syht/SourceHanSansSC-Medium-2.woff') format('woff'),
+    url('/static/index/font/syht/SourceHanSansSC-Regular-2.woff') format('woff');
+}
+body {font-family: 'syht', 'Poppins', sans-serif !important;}
 body {
     color: #333;
     background: #ffffff;
@@ -17,7 +31,7 @@ h6,
 .h5,
 .h6,
 a {
-    font-family: "Helvetica Neue", "Luxi Sans", "DejaVu Sans", Tahoma, "Hiragino Sans GB", STHeiti, "Microsoft YaHei";
+    /* font-family: "Helvetica Neue", "Luxi Sans", "DejaVu Sans", Tahoma, "Hiragino Sans GB", STHeiti, "Microsoft YaHei"; */
 }
 
 h1,

+ 1 - 2
static/index/css/main.css

@@ -13,7 +13,7 @@
     url('/static/index/font/syht/SourceHanSansSC-Medium-2.woff') format('woff'),
     url('/static/index/font/syht/SourceHanSansSC-Regular-2.woff') format('woff');
 }
-body {font-family: 'syht', 'Poppins', sans-serif;}
+body {font-family: 'syht', 'Poppins', sans-serif !important;}
 @media (min-width: 1300px) {
     .container {
         width: 1300px;
@@ -7125,7 +7125,6 @@ a:hover {
     color: #333;
     font-size: 14px;
     text-align: left;
-    line-height: 14px;
     margin-top: 10px;
 }