CSS: Fallback fonts

前端 未结 3 1628
北荒
北荒 2020-12-29 22:17

My website uses a rather obscure font that about half the computers can properly read. The font is \"Lucida Console\". On the computers that can\'t read this font, they get

3条回答
  •  心在旅途
    2020-12-29 22:33

    you can specify multiple fonts:

    p{font-family:"Times New Roman", Times, serif;}
    

    The browser will try the first one, if that one isn't available the second, and so forth. In the end it uses the family serif, so the browser choses any serif font. You should use the monospace family.

    So in your case, somthing like this is what you want:

    p{font-family:"Lucida Console", "Courier New", monospace;}
    

提交回复
热议问题