zoukankan      html  css  js  c++  java
  • 微信小程序 scroll-view 横向滚动问题

    主要2点

    1  scroll-view  设置 scroll-x="true"   style="100%"    white-space:nowrap;

    2  子元素 设置 display:inline-block;

    index.wxml

       <scroll-view scroll-x="true" class="scroll_view" >
              <view class="text1" style="background:red">111</view>
              <view class="text2"  style="background:orange">2222</view>
              <view class="text3"  style="background:blue">3333</view>
        </scroll-view>

    index.wxss

    .scroll_view{
      width: 100%;
      /* display:flex; */
      height: 200rpx;
      white-space: nowrap;
    }
    .text1,.text2,.text3{
      display:inline-block;
      width: 750rpx;
      height: 200rpx;
    }
  • 相关阅读:
    hdoj:2075
    hdoj:2072
    hdoj:2071
    hdoj:2070
    hdoj:2069
    test001
    hdoj:2067
    hdoj:2061
    hdoj:2058
    hdoj:2057
  • 原文地址:https://www.cnblogs.com/lvlisn/p/14756536.html
Copyright © 2011-2022 走看看