zoukankan      html  css  js  c++  java
  • uni-app 布局固定头部,内容滚动

    <template>
        <view class="container">
         <!-- toubu -->
         <view class="header">
             <text>头部</text>
         </view>
         <!-- 主要内容 -->
          <view class="body">
              <view>
                   <text>abc</text>
              </view>
              <view>
                             <text>abc</text>
              </view>
              <view>
                             <text>abc</text>
              </view>
              <view>
                             <text>abc</text>
              </view>
              <view>
                             <text>abc</text>
              </view>
              <view>
                             <text>abc</text>
              </view>
              <view>
                             <text>abc</text>
              </view>
              <view>
                             <text>abc</text>
              </view>
              <view>
                             <text>abc</text>
              </view>
              <view>
                             <text>abc</text>
              </view>
              <view>
                             <text>abc</text>
              </view>
              <view>
                             <text>abc</text>
              </view>
              <view>
                             <text>abc</text>
              </view>
              <view>
                             <text>abc</text>
              </view>
              <view>
                             <text>abc</text>
              </view>
              <view>
                             <text>abc</text>
              </view>
              <view>
                             <text>abc</text>
              </view>
              <view>
                             <text>abc</text>
              </view>
              <view>
                             <text>abc</text>
              </view>
              <view>
                             <text>abc</text>
              </view>
              <view>
                             <text>abc</text>
              </view>
              <view>
                             <text>abc</text>
              </view>
              <view>
                             <text>abc</text>
              </view>
              <view>
                             <text>abc</text>
              </view>
              <view>
                             <text>abc</text>
              </view>
              <view>
                             <text>abc</text>
              </view>
              <view>
                             <text>abc</text>
              </view>
              <view>
                             <text>abc</text>
              </view>
              <view>
                             <text>abc</text>
              </view>
              <view>
                             <text>abc</text>
              </view>
              
                
          </view>
     
        </view>
    </template>
     
    <script>
    </script>
     
    <style>
        page{
            display: -webkit-box;
             100%;
            height: 100%;
        }
    .container {
       100%;
      display: flex;
      min-height: 100vh;
      flex-direction: column;
     
    }
     
    .header {
     
      height:100rpx;
      background-color: #00C6B2;
    }
    .body{
          background: red;
          overflow-y: scroll;  
    }
     
    </style>

    效果:

  • 相关阅读:
    Bacula Plugins
    getopt、getopt_long命令参数
    Notepad++ 快捷键
    make命令
    Linux目录结构
    rhel安装输入法
    libtool编译
    install和cp
    dlopen动态链接库操作
    结构体赋值
  • 原文地址:https://www.cnblogs.com/caihongmin/p/15247648.html
Copyright © 2011-2022 走看看