开发者

Chrome css percentage

The problem is simple, webkit (or at least chrome) handle some percentage value badly.

For example if I have an overall div with a width of 450px, if I had it two child with a width value of 7.117% and 7.118%, the output will be two div with a respective width of 31px and 32px. (Fiddle of a test case)

Or a calculus shows that the calculated width value of both div is (in theory) above 32px. The results are 32.0265 and 32.031. So that doesn't appear to be a subpixel problem as rounding down both value is rounding them to 32.

I was 开发者_开发技巧wondering if there were any workaround/best practice or else to deal with it.


Updating chrome fixed the issue. Best practice: update your software.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜