1

我正在使用纯 CSS 来设置首字下沉样式。我的问题是 IE9 - 它似乎没有注意到在我测试过的所有其他浏览器(包括 IE 8 和 IE 10)中设置垂直位置的 line-height 值。我找不到调整下沉的垂直位置在 IE 9 中 - 你能帮我吗?

请参阅我的网站: http: //graphicviolence.co.uk,我的首字下沉的 CSS 是:

.art-postcontent > p:first-of-type:first-letter 
{
letter-spacing:0;
text-transform:uppercase;
color:#250607;
font-size:50px;
font-weight:normal;
float:left;
margin:5px 5px -7px 0; /* THESE VALUES SET TXT WRAP AROUND DROP CAP */
line-height:1; /* THIS SETS BASELINE POSITION OF DROP CAP */
}

谢谢你

4

1 回答 1

1

由于 IE9 以不同的方式呈现相对字体大小,您可以通过使用font relative lengths参考文档根字形大小来解决此问题。

在值上使用rem单位line-height,并将其与为文档根 ( html) 设置的字体大小相关联。

于 2012-06-18T15:53:48.990 回答