fonts.css 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* Inter字体文件本地版 */
  2. @font-face {
  3. font-family: 'Inter';
  4. font-style: normal;
  5. font-weight: 300;
  6. font-display: swap;
  7. src: local('Inter Light'), local('Inter-Light'), url('../fonts/Inter-Light.woff2') format('woff2');
  8. }
  9. @font-face {
  10. font-family: 'Inter';
  11. font-style: normal;
  12. font-weight: 400;
  13. font-display: swap;
  14. src: local('Inter Regular'), local('Inter-Regular'), url('../fonts/Inter-Regular.woff2') format('woff2');
  15. }
  16. @font-face {
  17. font-family: 'Inter';
  18. font-style: normal;
  19. font-weight: 500;
  20. font-display: swap;
  21. src: local('Inter Medium'), local('Inter-Medium'), url('../fonts/Inter-Medium.woff2') format('woff2');
  22. }
  23. @font-face {
  24. font-family: 'Inter';
  25. font-style: normal;
  26. font-weight: 600;
  27. font-display: swap;
  28. src: local('Inter SemiBold'), local('Inter-SemiBold'), url('../fonts/Inter-SemiBold.woff2') format('woff2');
  29. }
  30. @font-face {
  31. font-family: 'Inter';
  32. font-style: normal;
  33. font-weight: 700;
  34. font-display: swap;
  35. src: local('Inter Bold'), local('Inter-Bold'), url('../fonts/Inter-Bold.woff2') format('woff2');
  36. }
  37. /* 作为备选方案使用系统字体 */
  38. body {
  39. font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  40. }