@font-face not working on a client site?

前端 未结 3 2085
自闭症患者
自闭症患者 2021-01-13 00:47

This is CSS code

@font-face {
    font-family: \'FuturaStdBook\';
    src: url(\'site/font-face/futurastd-medium-webfont.eot\');
    src: local(\'☺\'), url(\         


        
3条回答
  •  [愿得一人]
    2021-01-13 01:33

    The problem are the definitions of font-weight and font-style in your font-face declaration. Since h2 elements are defined in a bold face by default, the font-face declaration is not taken into account for these elements (because the browser thinks, the font file is for normal weighted weight only, which is most probably true).

    Solution: You need a second font-face declaration with font-weight: bold in it or you set h2 elements to have font-weight:normal and font-style: normal.

提交回复
热议问题