Skip to main content

文字缩写属性 font

font 属性可以用来作为 font-style, font-variant, font-weight, font-size, line-heightfont-family 属性的简写,或将元素的字体设置为系统字体。

  • 如果 font 字体相关的属性的简写:

    • 必须包含以下值:

    • 可以选择性包含以下值:

    • font-style, font-variantfont-weight 必须在 font-size 之前

    • 在 CSS 2.1 中 font-variant 只可以是 normalsmall-caps

    • line-height 必须跟在 font-size 后面,由 "/" 分隔,例如 "16px/3"

    • font-family 必须最后指定。

  • 系统字体

    • caption:用于标题控件(如按钮,下拉列表等)的系统字体。
    • icon:用于标签图标的系统字体。
    • menu:菜单中(如下拉菜单和菜单列表)使用的系统字体。
    • message-box:用于对话框的系统字体。
    • small-caption:用于小标题控件的系统字体。
    • status-bar:用于窗口状态栏的系统字体。
    • 系统关键字前缀:浏览器经常会多实现几个带前缀的关键字;Gecko 实现了 -moz-window, -moz-document, -moz-desktop, -moz-info, -moz-dialog, -moz-button, -moz-pull-down-menu, -moz-list, 和 -moz-field.

  • font 是一个缩写属性
    • font 属性可以用来作为 font-style, font-variant, font-weight, font-size, line-heightfont-family 属性的简写;
    • font-style font-variant font-weight font-size/line-height font-family
  • 规则:
    • font-stylefont-variantfont-weight 可以随意调换顺序,也可以省略
    • /line-height 可以省略,如果不省略,必须跟在 font-size 后面
    • font-sizefont-family 不可以调换顺序,不可以省略
<p class="jd">
Massick said that while hair loss could come from stress and an autoimmune disease called alopecia areata, the
majority of her patients had androgenic alopecia, or male-pattern baldness. According to Cleveland Clinic, an
estimated 25% of men will notice hair loss before age 21, and 70% will experience hair loss as they age.
马西克称,脱发的原因可能是压力和一种称为斑秃的自身免疫性疾病,但她的大多数患者都患有男性秃头,也称雄激素性脱发。据克利夫兰医学中心估计,25% 的男性在 21 岁之前会出现脱发,70% 的男性会随着年龄增长而脱发。
</p>

<p class="taobao">
Male-pattern baldness is caused by the hormone dihydrotestosterone, or DHT, Massick said, which shrinks hair
follicles, causing hair to grow thinner and fall out more easily.
马西克说,雄激素性脱发是由激素二氢睾酮引起的。二氢睾酮会导致毛囊收缩,头发变细,更容易脱落。
</p>

<p class="bilibili">
A balanced diet rich in protein and iron can help keep your hair healthy and strong, Massick said. Foods like
chicken, eggs, greek yogurt, and beef contain high amounts of protein, which is most of what makes up hair
follicles. Protein also contains iron, which helps the body bring oxygen to cells associated with hair growth,
according to Healthline.
马西克说,富含蛋白质和铁的均衡饮食有助于保持头发健康强壮。鸡肉、鸡蛋、希腊酸奶和牛肉等食物含有大量蛋白质,这是构成毛囊的主要成分。据健康线网站报道,蛋白质含有铁元素,铁可以促进身体为与毛发生长相关的细胞提供氧气。
</p>

<p class="amazon">
Dr. Debra Jaliman, a dermatologist who is an assistant professor at the Dermatology Icahn School of Medicine at
Mount Sinai, previously told Insider that when the body doesn't get enough protein, the protein that is consumed is
allocated toward essential body functions, which doesn't include hair growth.
西奈山伊坎医学院皮肤病学助理教授、皮肤病医生德布拉·贾利曼博士告诉内幕网,当身体摄入蛋白质不足时,蛋白质消耗用于维持身体的基本功能,而不包括头发生长。
</p>
http://localhost:3000/font.html

Massick said that while hair loss could come from stress and an autoimmune disease called alopecia areata, the majority of her patients had androgenic alopecia, or male-pattern baldness. According to Cleveland Clinic, an estimated 25% of men will notice hair loss before age 21, and 70% will experience hair loss as they age. 马西克称,脱发的原因可能是压力和一种称为斑秃的自身免疫性疾病,但她的大多数患者都患有男性秃头,也称雄激素性脱发。据克利夫兰医学中心估计,25% 的男性在 21 岁之前会出现脱发,70% 的男性会随着年龄增长而脱发。

Male-pattern baldness is caused by the hormone dihydrotestosterone, or DHT, Massick said, which shrinks hair follicles, causing hair to grow thinner and fall out more easily. 马西克说,雄激素性脱发是由激素二氢睾酮引起的。二氢睾酮会导致毛囊收缩,头发变细,更容易脱落。

A balanced diet rich in protein and iron can help keep your hair healthy and strong, Massick said. Foods like chicken, eggs, greek yogurt, and beef contain high amounts of protein, which is most of what makes up hair follicles. Protein also contains iron, which helps the body bring oxygen to cells associated with hair growth, according to Healthline. 马西克说,富含蛋白质和铁的均衡饮食有助于保持头发健康强壮。鸡肉、鸡蛋、希腊酸奶和牛肉等食物含有大量蛋白质,这是构成毛囊的主要成分。据健康线网站报道,蛋白质含有铁元素,铁可以促进身体为与毛发生长相关的细胞提供氧气。

Dr. Debra Jaliman, a dermatologist who is an assistant professor at the Dermatology Icahn School of Medicine at Mount Sinai, previously told Insider that when the body doesn't get enough protein, the protein that is consumed is allocated toward essential body functions, which doesn't include hair growth. 西奈山伊坎医学院皮肤病学助理教授、皮肤病医生德布拉·贾利曼博士告诉内幕网,当身体摄入蛋白质不足时,蛋白质消耗用于维持身体的基本功能,而不包括头发生长。