嗨,我试着在一个离子content.how里面有一个内部滚动的div,我会得到内部div,取剩余的空间,而不是从css中设置像素数。
发布于 2020-02-07 19:56:12
希望它能帮上忙!
#wrapper {
display: flex;
flex-direction: column;
width: 200px;
height: 300px;
background: #ccc;
}
input, #scroll {
margin: 10px;
}
#scroll {
display: flex;
flex-grow: 1;
flex-direction: column;
background: #ddd;
overflow-y: auto;
}
<div id="wrapper">
<input type="text" placeholder="INPUT">
<input type="text" placeholder="INPUT">
<input type="text" placeholder="ANOTHER INPUT">
<div id="scroll">
<p>They see me scrolling</p>
<p>They see me scrolling</p>
<p>They see me scrolling</p>
<p>They see me scrolling</p>
<p>They see me scrolling</p>
<p>They see me scrolling</p>
<p>They see me scrolling</p>
<p>They see me scrolling</p>
<p>They see me scrolling</p>
</div>
</div>
https://stackoverflow.com/questions/60112389
复制相似问题