html - IE 滚动条中的额外空白

标签 html css

我在 IE9 中有一个可滚动的 div。滚动条的右侧有一个额外的空白区域。

enter image description here

当我将滚动条向右移动时,右侧的空白变小,但转移到滚动条的左侧,直到完全消失。

enter image description here

有人知道为什么会这样吗?

谢谢!

编辑:

这是一个 jsfiddle您可以在其中看到滚动条中的空白区域。

enter code here

最佳答案

这很可能是由行内 block 元素之间的空白渲染引起的。它立即让我想起了 Chris Coyier 的 article on the subject at CSS-Tricks :

This isn't a "bug" (I don't think). It's just the way setting elements on a line works. You want spaces between words that you type to be spaces right? The spaces between these blocks are just like spaces between words. That's not to say the spec couldn't be updated to say that spaces between inline-block elements should be nothing, but I'm fairly certain that is a huge can of worms that is unlikely to ever happen.

他提供了多种解决方案。

关于html - IE 滚动条中的额外空白,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19994939/

相关文章:

html - 使用 SVG 剪辑(或屏蔽)DIV

html - CSS 上的边框高度

html - 组织导航栏 div 元素

javascript - 在 asp.net aspx 页面上使用 jquery 获取隐藏字段值时遇到问题

HTML 导航菜单栏拒绝工作

html - 视频元素从叠加元素中窃取事件

html - 如何让滚动的 div 占其父元素的 100% 以下?

html - 如何将此文本移动到另一行

jquery - phonegap + jquery 移动示例的来源

css - 仅显示适合的元素数量,然后展开以紧密贴合