内容简介:Although it's great toFor example, I use the following CSSThis uses the default sans-serif fonts on macOS, some Linux distributions and Windows. And if none of them are available, it uses the default sans-serif font chosen by the web browser.
Although it's great to self-host your web fonts instead of using a service like Google Fonts (that may decrease the privacy of your site's visitors, because Google can log IP addresses and other stuff), it's probably not necessary to use web fonts at all. Every PC or tablet or phone has a lot of fonts already pre-installed, which are more than perfect for displaying your website (unless you take a lot of care about corporate design or your personal brand and require a specific font).
For example, I use the following CSS font-family
property in my blog and website theme ( view the stylesheet
):
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
This uses the default sans-serif fonts on macOS, some Linux distributions and Windows. And if none of them are available, it uses the default sans-serif font chosen by the web browser.
No font files are downloaded when you open my blog. It doesn't need additional HTTP-requests, bandwidth or cache and no font CDN can log your IP address, browser version or other information your browser sends with every request. Additionally the page loads a little bit faster.
You can read more about system fonts here .
以上所述就是小编给大家介绍的《Use system fonts to make your site load faster》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。