zoukankan      html  css  js  c++  java
  • CSS3实现多列纵向滚动

    效果如图:
    小程序wxml:
    <view class='wraper'>
    <view class="header">
    头部
    </view>
    <view class='section'>
    <scroll-view scroll-y="true" class='left' scroll-view="true">
    <view wx:for="{{30}}" wx:key="{{index}}" class='row'>{{index}}</view>
    </scroll-view>
    <scroll-view class='right' scroll-y="true">
    <view wx:for="{{30}}" wx:key="{{index}}" class='row'>{{index}}</view>
    </scroll-view>
    </view>
    <view class='footer'>
    底部
    </view>
    </view>
     
    wxss:
    .wraper {
         100%;
        height: 100%;
        overflow: hidden;
        display: -webkit-box;
        -moz-box-orient: vertical;
        -webkit-box-orient: vertical;
    }
    .header,.footer{
         100%;
        height: 120rpx;
        line-height: 120rpx;
         font-family: Monaco; font-size: 9pt;">#fff;
        text-align: center;
    }
    .section {
        display: -webkit-box;
         100%;
        -webkit-box-flex: 1;
    }
    .left {
        -webkit-box-flex: 1;
         400rpx;
        overflow: auto;
         font-family: Monaco; font-size: 9pt;">#fff;
    }
    .right {
        -webkit-box-flex: 1;
        overflow: auto;
    }
    .row {
         100%;
        height: 90rpx;
        border-top: 1rpx solid #ccc;
    }
    实现思路给最外层大盒子设置弹性盒,并改变方向。头部固定高,底部固定高,中间高度为flex:1;并变为弹性盒,在中间左固定宽度,高度flex:1;over-flow: auto;右侧相同。即可实现圣杯布局中间多列纵向滚动。
    这里用的是box,使用一样的用法,查看上篇display:box
  • 相关阅读:
    pytest临时文件
    djangoclassmeta说明
    python方法
    字符串统计个数2
    python之fixture作用域
    djangomodel在已有model同步添加新的字段
    将 Access 数据库 转换到Sql Server 中
    .net 实现条码
    条码打印异步调用
    日期控件datepicker 只能选指定段日期案例
  • 原文地址:https://www.cnblogs.com/bgwhite/p/9304766.html
Copyright © 2011-2022 走看看