What this CSS code means (font-size division)?

前端 未结 4 1409
天涯浪人
天涯浪人 2020-12-17 07:51

Sorry everyone, I really can\'t find any better title for my question.

I have encountered with this code

font: 9pt/18px Tahoma;

Do

相关标签:
4条回答
  • 2020-12-17 08:24

    The first unit is font-size, the second is line-height.

    0 讨论(0)
  • 2020-12-17 08:30

    Yes. It's a short-hand way of writing font-size and line-height together.

    0 讨论(0)
  • 2020-12-17 08:39

    It's the font-size and line-height when you're using shorthand for the font declaration. So 9pt font-size and 18px line-height.

    0 讨论(0)
  • 2020-12-17 08:42
    /* The shorthand */
    font: 9pt/18px Tahoma;
    
    /* The expanded version of the above style */
    font-size:9pt;
    line-height:18px;
    font-family:Tahoma;
    
    0 讨论(0)
提交回复
热议问题