当前位置:网站首页>How to hide the scroll bar of scroll view in uniapp
How to hide the scroll bar of scroll view in uniapp
2022-07-02 02:10:00 【Little ape classmate】
1. We are using uniapp Of scroll-view Component time , It often appears scrollbars , As shown in the figure below .
2. So how can we solve it ? First, we find the of the project App.vue File and then style Add the following code to the label , thus , The properties of different tags can be controlled according to different platforms .
<style>
/* Every page is public css */
/* Resolve applets and app Scroll bar problem */
/* #ifdef MP-WEIXIN || APP-PLUS */
::-webkit-scrollbar {
display: none;
width: 0 !important;
height: 0 !important;
-webkit-appearance: none;
background: transparent;
color: transparent;
}
/* #endif */
/* solve H5 The problem of */
/* #ifdef H5 */
uni-scroll-view .uni-scroll-view::-webkit-scrollbar {
/* Hide scroll bar , But it still has the function of scrolling */
display: none;
width: 0 !important;
height: 0 !important;
-webkit-appearance: none;
background: transparent;
color: transparent;
}
/* #endif */
</style>
3. We can still do that App.vue Of style Internal and external links base.css This method can control all scroll bars .
<style>
/* Every page is public css */
@import url("./src/assets/css/base.css");
</style>
4.base.css The code is as follows
::-webkit-scrollbar {
display: none;
width: 0 !important;
height: 0 !important;
-webkit-appearance: none;
background: transparent;
color: transparent;
}
边栏推荐
- 【视频】马尔可夫链原理可视化解释与R语言区制转换MRS实例|数据分享
- Post infiltration flow encryption
- Architecture evolution from MVC to DDD
- 1217 supermarket coin processor
- 开发工具创新升级,鲲鹏推进计算产业“竹林”式生长
- Iterative unified writing method of binary tree
- Experimental reproduction of variable image compression with a scale hyperprior
- Webgpu (I): basic concepts
- MySQL constraints and multi table query example analysis
- Spend a week painstakingly sorting out the interview questions and answers of high-frequency software testing / automated testing
猜你喜欢
1069. Division of convex polygons (thinking, interval DP)
How to execute an SQL in MySQL
How to debug apps remotely and online?
mysql列转行函数指的是什么
How to build and use redis environment
How to batch add background and transition effects to videos?
如何远程、在线调试app?
With the innovation and upgrading of development tools, Kunpeng promotes the "bamboo forest" growth of the computing industry
leetcode373. Find and minimum k-pair numbers (medium)
A quick understanding of digital electricity
随机推荐
Deep learning: a solution to over fitting in deep neural networks
Sword finger offer 29 Print matrix clockwise
Volume compression, decompression
Openssl3.0 learning XXI provider encoder
1222. Password dropping (interval DP, bracket matching)
Architecture evolution from MVC to DDD
2022 Q2 - résumé des compétences pour améliorer les compétences
Construction and maintenance of business websites [10]
Iterative unified writing method of binary tree
"C language programming", 4th Edition, edited by he Qinming and Yan Hui, after class exercise answers Chapter 3 branch structure
Which is a good Bluetooth headset of about 300? 2022 high cost performance Bluetooth headset inventory
np.where 和 torch.where 用法
Cross domain? Homology? Understand what is cross domain at once
The difference between new and malloc
leetcode2310. The one digit number is the sum of integers of K (medium, weekly)
A quick understanding of digital electricity
OpenCASCADE7.6编译
* and & symbols in C language
Pytest testing framework
Implementation principle of city selector component