uni-app - 去除 “<scroll-view>“ 超出高度出现的滚动条(全局或局部均可)

问题描述

当您使用 <scroll-view> 时,出现了如下图所示滚动条:

在这里插入图片描述

作为移动端,这是我们不想看到的结果。

解决方案

如果您想全局去除,请将以下代码放在 App.vue 文件中的 <style> 中即可。

打开想要去除的页面,在该页面的样式中写入:

scroll-view ::-webkit-scrollbar {
   
    
    
	display: none !important;  
	width: 0 !important;  
	height

猜你喜欢

转载自blog.csdn.net/weixin_44198965/article/details/126304160