IE11缺少主要元素的用户代理样式(display:block;) [英] IE11 is missing User Agent Style for main element (display: block;)
本文介绍了IE11缺少主要元素的用户代理样式(display:block;)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
显然,IE11没有用于< main>
的用户代理风格,因此没有 display:block;
就可以了。 为什么没有用户代理风格?这是一个错误还是有意为之?
添加 display:block;
到主要元素就足够了,tho。
解决方案 元素确实不被IE11完全支持。添加
main {display:block; }
到你的CSS是IE9 +的最佳解决方案。因为 display:block; 是 main
元素的默认行为,所以您不需要制作条件注释。不会弄乱任何东西。
Apparantly IE11 doesn't have a User Agent Style for <main>
and therefor no display: block;
on it. Why is there no User Agent Style? Is this a bug or on purpose?
Adding display: block;
to the main element is enough, tho.
解决方案 The main
element is indeed not fully supported by IE11. Adding main { display: block; }
to your CSS is the best solution for IE9+. You don't need to make conditional comments - since display: block;
is the default behavior for main
elements, it won't mess up anything.
这篇关于IE11缺少主要元素的用户代理样式(display:block;)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文