html - 不同宽度的谷歌浏览器

标签 html css macos google-chrome width

我在使用谷歌浏览器时遇到了一个奇怪的问题:

使用以下代码:

<li class="smallAds fleft">
<a href="news">
    <img class="addBorder" src=".." alt="Dialetu news!" />
</a>
</li>

li 元素在 firefox 和其他浏览器上的宽度为 190px,但在 chrome 上为 190.016px。这个小差异足以破坏布局。

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

这只发生在 Mac 版 Chrome 上,在 Windows 上它完美运行。此外,我的 css 规则没有 li 元素的宽度,因为它应该继承 img 的宽度。

这里的相关 CSS 是与图像关联的 CSS,因为上述元素没有任何特定样式:

#afterSlideShowSection ul li img {
border-right: 2px solid #fff;
box-sizing: border-box;
height: auto;
margin-top: 2px;
width: 190px;
}

最佳答案

关于html - 不同宽度的谷歌浏览器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30373157/

相关文章:

html - 如何让 Bootstrap 网格系统在分配布局大小时填充空白区域?

javascript - 如何使用node.js 0.12在OSX Yosemite上正确安装node-inspector?

jquery - Jquery 的 FadeIn 和 FadeOut 问题

html - Flexbox:水平和垂直居中

html - 我如何养 child (位置:fixed) below the parent (`position:fixed` )?

html - 文本区域不会让 parent 成长

python - 如何让 Automator 使用 pyperclip 识别 python 脚本?

python - Mac OS X El Capitan下如何清理/Library/Python/2.7/site-packages

javascript - 自定义 NumberPicker - 优化

javascript - 为什么单击表单按钮时我的 DOM 更改消失了?