直播软件app开发,uniapp scroll-view隐藏滚动条

直播软件app开发,uniapp scroll-view隐藏滚动条

uni-app的vue页面,app端scroll-view的滚动条设置,可通过css的-webkit-scrollbar自定义,包括隐藏滚动条。(app-nvue无此css)

 

在pages.json页面增加以下配置:

 


"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "index",
"app-plus": {
"scrollIndicator": "none"//隐藏该页面滚动条
}
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8",
"app-plus": {
"scrollIndicator": "none"//隐藏所有页面滚动条
}
}

在App.vue页面的style中:

 


<style>
/*每个页面公共css */
::-webkit-scrollbar {
display: none;
width: 0 !important;
height: 0 !important;
-webkit-appearance: none;
background: transparent;
}
</style>

 

以上就是直播软件app开发,uniapp scroll-view隐藏滚动条, 更多内容欢迎关注之后的文章

 

posted @ 2022-07-27 14:06  云豹科技-苏凌霄  阅读(169)  评论(0)    收藏  举报