CSS Font “Helvetica Neue”

前端 未结 5 1417
有刺的猬
有刺的猬 2021-01-30 08:58

I often see the websites using font \"Helvetica Neue\". Is this font safe to use, like eg. Arial? Or do the browsers have trouble rendering it or not many machines have this fon

5条回答
  •  悲&欢浪女
    2021-01-30 09:20

    It's a default font on Macs, but rare on PCs. Since it's not technically web-safe, some people may have it and some people may not. If you want to use a font like that, without using @font-face, you may want to write it out several different ways because it might not work the same for everyone.

    I like using a font stack that touches on all bases like this:

    font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", 
      Helvetica, Arial, "Lucida Grande", sans-serif;
    

    This recommended font-family stack is further described in this CSS-Tricks snippet Better Helvetica which uses a font-weight: 300; as well.

提交回复
热议问题