css中的14px / 26px字体大小是什么? [英] What does 14px/26px font size in css do?

查看:176
本文介绍了css中的14px / 26px字体大小是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在检查某人的CSS,我注意到他们正在做一些我以前没有见过的...

  body {font:14px / 26pxHelvetica Neue,Arial,Helvetica,Geneva,sans-serif} 

14px / 26px是什么?

解决方案

根据CSS 2.1规范 font 速记属性:


15.8速记字体属性:

'font'

值:[[<'font-style'> || <'font-variant'> || <'font-weight'>]? <'font-size'> [/<'line-height'>]? <'font-family'>] |字幕|图标|菜单|消息框|小字幕|状态栏|继承


第一个值是 font-size 值是 line-height 值。



因此 font:14px / 26px。 。表示:

  font-size:14px; 
line-height:26px;
font-family:...


I've been inspecting someone elses CSS and I noticed they are doing something I haven't seen before...

body {font:14px/26px "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif}

What does the 14px/26px do? I've tried to google it but nothing seems to come up.

解决方案

According to the CSS 2.1 Specifications for the font shorthand property:

15.8 Shorthand font property: the 'font' property

'font'
Value: [ [ <'font-style'> || <'font-variant'> || <'font-weight'> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'> ] | caption | icon | menu | message-box | small-caption | status-bar | inherit

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

So font: 14px/26px ... means:

font-size: 14px;
line-height: 26px;
font-family: ...

这篇关于css中的14px / 26px字体大小是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆