简体   繁体   中英

Could I use font-family BEFORE font-face?

I am curious about the right order of css rules font-family and font-face...

Could I use font-family before the font-face?

Like this:

h2 {
  font-family: 'inconsolatacyrmedium';
  }


@font-face {
    font-family: 'inconsolatacyrmedium';
    src: url('inconsolatacyr-webfont.woff2') format('woff2'),
         url('inconsolatacyr-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;

}

我认为您应该在字体家族之前使用@ font-face,因为浏览器会从上到下读取css。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM