最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How do I redefine the css property @font-face? - Stack Overflow

programmeradmin1浏览0评论

Importing styles from an external library to index.html:

import 'outside-library/styles/main.css';

The main.css file contains custom fonts:

@font-face {
    font-family: 'Noto Sans';
    font-weight: 800;
    src: url('../assets/NotoSans-ExtraBold.ttf');
} 

Everything works fine, but ttf fonts have a large size. I want to redefine this font and upload it in woff/woff 2 format. I made a new css file in which I wrote:

@font-face {
    font-family: 'Noto Sans';
    font-weight: 800;
    src: url('../assets/NotoSans-ExtraBold.woff');
}

but wherever I connect a new file: before or after main.css, the browser still loads the ttf font. Is there any way to redefine @font-face?

发布评论

评论列表(0)

  1. 暂无评论