IE 11/12 border-radius 1px bug

2019-09-16 18:30发布

问题:

I've just found out that IE 11 & 12 can't handle border-radius properly. Sometimes (not always, what is extra wierd) there is a 1px gap between the border element and the next element like here

http://www.leukewereld.be/wp/

When I drop the border-radius all is fine. Anybody knows a solution/workaround for this?

回答1:

Yes this is a bug which has been reported in IE11. You can refer IE 11 Div With "border-radius" Bug which contains the solution and the discussion on the same.



回答2:

I encountered the same bug on my current project. Not only with border-radiuses (as disabling those did not always make a difference) but with box-shadows as well. Using certain line-height values in the affected area seemed to work, but necessitated ugly workarounds to keep the layout as intended...

A good solution in my case, and perhaps for many others, is to use an overflow:hidden wrapper. (Luckily I happened to need one of those anyway.)

I forgot where I originally found that suggestion but kudos to the person who came up with it! :)