【问题标题】:Scrollable Inner Div inside ion content可滚动的 Inner Div 内部的 ion 内容
【发布时间】:2020-05-23 12:39:52
【问题描述】:

您好,我正在尝试在离子内容中使用内部滚动 div。我将如何让内部 div 占用剩余空间而不是从 css 设置像素数。

【问题讨论】:

    标签: css ionic-framework sass ionic4


    【解决方案1】:

    希望对你有帮助!

    #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>

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-11-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-04-15
      相关资源
      最近更新 更多