当前位置 博文首页 > CSS字体_cuk0051的博客:css字体加粗

    CSS字体_cuk0051的博客:css字体加粗

    作者:[db:作者] 时间:2021-08-25 10:03

    css字体加粗

    At the dawn of the web you only had a handful of fonts you could choose from.

    在网络诞生之初,您只有少数几种字体可以选择。

    Thankfully today you can load any kind of font on your pages.

    值得庆幸的是,今天您可以在页面上加载任何字体。

    CSS has gained many nice capabilities over the years in regards to fonts.

    多年来,CSS在字体方面获得了许多不错的功能。

    The font property is the shorthand for a number of properties:

    font属性是许多属性的简写:

    • font-family

      font-family

    • font-weight

      font-weight

    • font-stretch

      font-stretch

    • font-style

      font-style

    • font-size

      font-size

    Let’s see each one of them and then we’ll cover font.

    让我们看看它们中的每一个,然后我们将介绍font

    Then we’ll talk about how to load custom fonts, using @import or @font-face, or by loading a font stylesheet.

    然后,我们将讨论如何使用@import@font-face或通过加载字体样式表来加载自定义字体。

    font-family (font-family)

    Sets the font family that the element will use.

    设置元素将使用的字体系列

    Why “family”? Because what we know as a font is actually composed of several sub-fonts. which provide all the style (bold, italic, light..) we need.

    为什么是“家庭”? 因为我们所知道的字体实际上是由几个子字体组成的。 提供我们需要的所有样式(粗体,斜体,浅色..)。

    Here’s an example from my Mac’s Font Book app - the Fira Code font family hosts several dedicated fonts underneath:

    这是我Mac的Font Book应用程序中的一个示例-Fira Code字体家族在下面托管了几种专用字体:

    cs