【发布时间】:2020-05-23 12:39:52
【问题描述】:
您好,我正在尝试在离子内容中使用内部滚动 div。我将如何让内部 div 占用剩余空间而不是从 css 设置像素数。
【问题讨论】:
标签: css ionic-framework sass ionic4
您好,我正在尝试在离子内容中使用内部滚动 div。我将如何让内部 div 占用剩余空间而不是从 css 设置像素数。
【问题讨论】:
标签: css ionic-framework sass ionic4
希望对你有帮助!
#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>
【讨论】: