在 div 上设置 4px 高度会导致 IE8 中的空间约为 12 像素
<div id="spacer">
</div>
+
#spacer {
height: 4px;
}
Firefox 和 Safari 做得很好,屏幕上的空间很小。 IE8 使其大于 4px。 WTF。
如果我将其设置为 200 像素或其他值,空间就很大了。它会减小,直到我达到大约 15 px,此时 IE 继续绘制 15 px 的空间,尽管 css 说是 4 px。
如果你能帮助我,非常感谢。
<div id="spacer">
</div>
+
#spacer {
height: 4px;
}
Firefox and Safari do it right, the space on screen is small. IE8 makes it bigger than 4px. WTF.
If I set it to 200 pixels or whatever, the space is huge. It decreases until I get to around 15 px, at which point IE continues to draw a 15ish px space despite the css saying 4px.
Thanks so much if you can help me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您几乎肯定会遇到行高和/或字体大小属性。尝试减少这些,空间就会缩小。
You're almost certainly running into the line-height and/or font-size properties. Try decreasing those and the space should shrink.