用uniapp开发小程序,内容多的情况下,在微信开发者工具和真机调试下,右侧出现滚动条,有没有办法隐藏滚动条?
解决办法一:
参考文档:uniapp.dcloud.net.cn/collocation…
全局配置:
"globalStyle": { //全局配置
"scrollIndicator":"none", // 不显示滚动条
"app-plus":{
"scrollIndicator":"none" // 在APP平台都不显示滚动条
}
}
局部配置:
"path": "pages/index/index",
"style": {
"scrollIndicator":"none", // 该页不显示滚动条
"app-plus":{
"scrollIndicator":"none" // 在该页APP平台不显示滚动条
}
}
配置完毕后,需要重启编辑器并重新编译。
解决办法二:
::-webkit-scrollbar {
width: 0;
height: 0;
background-color: transparent;
}
只能使用于在scroll-view中