为什么页边距在Internet Explorer中无法使用html5& overflow:hidden? [英] Why margins don't work in Internet Explorer with html5 & overflow:hidden?
本文介绍了为什么页边距在Internet Explorer中无法使用html5& overflow:hidden?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
HTML:
<main>
<p>
this is a paragraph in main...
</p>
</main>
<section>
this is a section...
</section>
CSS:
p{ margin:100px; background:#99ff99; }
main{ overflow:hidden; background:#ff9999; }
section{ margin:100px; background:#9999ff; }
小费: https://jsfiddle.net/fhbyw80m/
为什么当我们使用像这样的IE时, ?
Also why margin don't work in IE when we use like this?
HTML:
<main>
<p>
this is a paragraph...
</p>
</main>
<aside>
this is aside...
</aside>
CSS:
main{background:#ff9999; margin-bottom:150px; }
p{background:#99ff99; margin-bottom:30px; }
aside{background:#9999ff;}
小提琴: https://jsfiddle.net/gLLt9vhy/
推荐答案
因为所使用的Internet Explorer版本不支持 main
元素。
Because the main
element is not supported by the version of Internet Explorer you are using.
请参阅 http://caniuse.com/#search=Main 上的浏览器兼容性。
See browser compatibility at http://caniuse.com/#search=Main.
更多详情:
- Default settings of unrecognized HTML elements
- CSS width not working on <main> in Internet Explorer 11
这篇关于为什么页边距在Internet Explorer中无法使用html5& overflow:hidden?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文