html - Chrome 中奇怪的边框宽度行为?

标签 html css google-chrome behavior

我的 Chrome(v. 33.0.1750.152)在某些输入的边框宽度方面表现得非常奇怪。

这是一个演示它的 Codepen:http://codepen.io/anon/pen/Dkadl .

我添加了 Increase margin..Decrease margin.. 按钮以使其更易于查看(单击它们可更改 margin-bottom 相应的属性(property))。

.user-inputsmargin-bottom 属性似乎影响了我输入的 border-width 并模糊了其他输入元素。我只能在 Chrome 中看到这个错误。

怎么了?

编辑:这对我来说是这样的: Default view Added 2px to margin-bottom
如您所见,元素变得非常模糊,并且某些元素的边框宽度增加了。

最佳答案

这是由 Translate 50% 引起的,在它不是整数(部分像素)的边距上,它使内容变得模糊。

this similar question 上的回答,将这些添加到您的#login-section block 中:

-webkit-font-smoothing: subpixel-antialiased;
-webkit-transform: translateZ(0) scale(1.0, 1.0);

查看更新 Codepen

关于html - Chrome 中奇怪的边框宽度行为?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22561477/

相关文章:

javascript - onclick 事件在 iphone 上不起作用

html - IE 10 移动版的奇怪水平平移?

html - 下拉菜单在 IE8 中消失

css - 帖子未对齐以在较小的屏幕尺寸上居中

javascript - 如何从@import url 中提取 CSS 样式

javascript - 不要在 chrome 扩展中重新加载弹出窗口

javascript - Polymer - 遍历模板中的对象

javascript 在 I.E. 中不工作9 以及 Firefox

Java Selenium ChromeDriver SendKeys 真的很慢

javascript - 为什么 Array.prototype.sort() 在 Chrome 开发工具中不起作用?