微信小程序左右分類滾動列表


左右分別滾動,互不干擾,先把簡單的布局和樣式搭好。

 1 <view class="page">
 2   <view class="flex_row">
 3     <view class="nav_left" >
 4       <view style="height:1500rpx;">左側分類</view>
 5     </view> 
 6     <view class="nav_right">
 7       <view class="nav_right_top">右側頂部分類</view>
 8       <scroll-view class="nav_right_list" scroll-y="true">
 9         <view style="height:1200rpx;">右側列表</view>
10       </scroll-view>
11     </view>
12   </view>
13 </view>

css樣式

1 .flex_row{display: flex;flex-direction: row;}
2 .nav_left{width: 25%;height:100vh;overflow-y:auto; }
3 .nav_right{width: 75%;position: relative;}
4 .nav_right .nav_right_top{padding-top:20rpx;position: fixed;top:0;right:0;width: 75%;height:80rpx;font-size:30rpx;
5 border-bottom: 1px solid #dedede;display:flex;flex-direction:row;white-space: nowrap;background: #fff;z-index: 99}
6 .nav_right_list{margin-top:80rpx;height:calc(100vh - 80rpx);}

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM