IE11 is missing User Agent Style for main element (display: block;)

早过忘川 提交于 2019-11-30 16:38:05

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/20094276/ie11-is-missing-user-agent-style-for-main-element-display-block

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!