CSS: Is Helvetica the default 'sans-serif' font on Mac and Arial the default sans-serif font on Windows?

后端 未结 6 814
萌比男神i
萌比男神i 2021-02-05 08:44

I have a lot of CSS that does the following:

font-family: Helvetica, Arial, sans-serif;

It my understanding that Helvetica is the default sans-

6条回答
  •  我在风中等你
    2021-02-05 09:20

    You can be pretty certain that Helvetica is installed on machines running Mac OS X, because that font is used in a number of official applications designed by Apple. Arial is also available on any machine, provided that the user hasn't deleted the font file.

    But as Tom points out, it's better to be as specific as possible when defining font styles. When I want a sans-serif family displayed I usually have the following in my stylesheets:

    Helvetica, Geneva, Arial, sans-serif;
    

提交回复
热议问题