html - 字体百分比

标签 html css

在样式表中找到这段代码:

.dropcap
{
    float:left;
    font:normal 290%/85%;   
    line-height:90%;
    padding-right:0.02em;
    margin-bottom:-0.1em;
} 

有人可以告诉我百分比(290% 和 85%)代表什么吗?我以为 85% 是行高,但我显然错了。

最佳答案

290% 应该是 font-size,你是对的,85% 应该是 line-height,但是,font 速记声明不完整:它应该什么都不做。您需要在 font 简写中设置 font-family,使其成为有效的属性值。

http://jsfiddle.net/5Yh3g/

font:normal 290%/85% 'Times New Roman', Times, serif;

编辑:不,即使它是预处理代码,它仍然是无效的属性值。

关于html - 字体百分比,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23233324/

相关文章:

html - CSS :not for a specific td with :before selector in responsive table

html - CSS 优先链接

css - 使用 CSS 到达没有标签的元素

javascript - 如何在下拉菜单中并排放置 li?

html - 让非固定宽度的 div 完美适合父级而不会溢出?

css - 使用跨度类是好习惯吗?

css - Twitter Bootstrap 移动设备上的导航空白

jquery - 显示:none stopping initial translate3d animation

javascript - "popover"Twitter Bootstrap css/javascript 库上的问题

html - 带有图像的 CSS 按钮,可以不调用图像吗?