@font-face: bold in FF is bolder than in Chrome

后端 未结 9 1480
攒了一身酷
攒了一身酷 2021-01-31 05:03

I used this code:

@font-face {
    font-family: \'DroidSansRegular\';
    src: url(\'droidsans-webfont.eot\');
    src: url(\'droidsans-webfont.eot?#iefix\') for         


        
9条回答
  •  难免孤独
    2021-01-31 05:39

    You have specified two faces in two different families. You have defined a regular face in a family called “DroidSansRegular” and you have defined a bold face in a family called “DroidSansBold”. The design of CSS expects you to define those as two weights of one family. If you make both say font-family: "DroidSans";, then you can use a font family called “DroidSans” and when you ask for bold, you get the bold face from that family.

    (Oops. The chosen answer already gave the correct solution but didn’t quite explain what was wrong.)

提交回复
热议问题