微信小程序—scroll-view 设置scroll-x或者scroll-y如何去掉滚动条
第一种方法:
::-webkit-scrollbar {
display: none;
width: 0 !important;
height: 0 !important;
-webkit-appearance: none;
background: transparent;
}
.scroll-view::-webkit-scrollbar {
display: none;
width: 0 !important;
height: 0 !important;
-webkit-appearance: none;
background: transparent;
}
第二种方法:添加( enhanced :show-scrollbar=“false”)
<scroll-view
:style="{ height: height + 'rpx' }"
scroll-x
class="scroll-view"
enhanced
:show-scrollbar="false"
>
</scroll-view>