f***@163.com
f***@163.com
  • 发布:2020-07-20 22:34
  • 更新:2020-12-17 09:24
  • 阅读:3559

设置show-scrollbar=false,在iOS无法隐藏滚动条

分类:uni-app

代码如下:

<scroll-view class="top-tab" :style="swiperTop" :scroll-left="scrollLeft" scroll-with-animation="true" scroll-x="true"  show-scrollbar="false">  
            <block v-for="(item,index) in tabList" :key="index">  
                <view class="tab-item" v-bind:id="'tabNum'+index" @click="swichTab(index)">  
                    <view :class="[curTab == index ? 'item-on' : 'item']">  
                        <view class="item-txt">{{item.name}}</view>  
                        <view class="cur-line"></view>  
                    </view>  
                </view>  
            </block>  
            <view class="tab-item tab-item-more" @click="gotoCategory()">  
                更多  
            </view>  
        </scroll-view>
2020-07-20 22:34 负责人:DCloud_iOS_XHY 分享
已邀请:
DCloud_iOS_XHY

DCloud_iOS_XHY

nvue 支持这个属性,vue 不支持

  • 1***@qq.com

    scroll-view 在android 上无法显示滚动条怎么回事呢

    2020-07-29 14:30

  • 6***@qq.com

    那在Vue页面如何取消滚动条呢

    2020-12-10 10:43

  • 5***@qq.com

    回复 6***@qq.com: 解决了吗?

    2020-12-17 09:17

5***@qq.com

5***@qq.com - xxxxx

在元素下样式控制:

:-webkit-scrollbar { display: none;
width: 0 !important;
height: 0 !important;
-webkit-appearance: none;
background: transparent;
}

该问题目前已经被锁定, 无法添加新回复