我正在尝试使用width:100%在我的页面上填充flex增长区域;身高:100%。它适用于所有其他浏览器,但Chrome。你能看出出了什么问题。这是Chrome中的错误吗?
HTML:
<main>
<h2>Heading <small>Subheading</small></h2>
<section>
<div id="expandMe">Content</div>
</section>
</main>
CSS:
* {
margin: 0; padding: 0;
}
body {
background: black;
}
main {
background: silver;
display: flex;
box-sizing: border-box;
flex-direction: column;
width: 90%;
height: 100vh;
margin: auto;
}
h2 {
text-align: center;
background: gray;
}
h2 > small {
display: block;
}
main section {
flex-grow: 1;
}
#expandMe {
width: 100%;
height: 100%;
background: olive;
}