且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

当孩子比父母宽时,Chrome和Safari无法正确计算利润率

更新时间:2022-12-17 19:05:45

在两种浏览器的检查器中查看页面(完全忽略javascript),您会看到相同的区别(因此排除了jQuery).

looking at the page in the inspectors for both browsers (ignoring javascript completely) you can see the same differences (so that rules out jQuery).

这看起来确实很奇怪,并且似乎是通过webkit报告的错误.

It does seem odd and appears to be reported bug with webkit.

https://bugs.webkit.org/show_bug.cgi?id=13343

https://bugs.webkit.org/show_bug.cgi?id=24511

评论中提到了一种解决方法:一种解决方法是将元素设置为显示:无(或内联块),测量边距,然后将显示设置回块."

The comments mention a workaround "A workaround is setting the element to display:none (or inline-block), measuring the margin then setting display back to block."