当前位置:网站首页>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;
}
边栏推荐
- Golang lock
- Logging only errors to the console Set system property ‘log4j2. debug‘ to sh
- Deep learning: a solution to over fitting in deep neural networks
- pytest 测试框架
- What are the necessary things for students to start school? Ranking list of Bluetooth headsets with good sound quality
- How to debug apps remotely and online?
- PR second training
- Pytest testing framework
- 321. Chessboard segmentation (2D interval DP)
- 【视频】马尔可夫链原理可视化解释与R语言区制转换MRS实例|数据分享
猜你喜欢
mysql列转行函数指的是什么
From January 11, 2007 to January 11, 2022, I have been in SAP Chengdu Research Institute for 15 years
MySQL如何解决delete大量数据后空间不释放的问题
Golang lock
Number of palindromes in C language (leetcode)
1069. Division of convex polygons (thinking, interval DP)
JPM 2021 most popular paper released (with download)
【视频】马尔可夫链原理可视化解释与R语言区制转换MRS实例|数据分享
Webgpu (I): basic concepts
Redis环境搭建和使用的方法
随机推荐
What is the MySQL column to row function
AR增强现实可应用的场景
牛客网——华为题库(51~60)
Medical management system (C language course for freshmen)
Number of palindromes in C language (leetcode)
自动浏览拼多多商品
[C #] use regular verification content
Electronic Society C language level 1 32, calculate the power of 2
What style of Bluetooth headset is easy to use? High quality Bluetooth headset ranking
Sword finger offer 47 Maximum value of gifts
剑指 Offer 42. 连续子数组的最大和
Decipher the AI black technology behind sports: figure skating action recognition, multi-mode video classification and wonderful clip editing
开发工具创新升级,鲲鹏推进计算产业“竹林”式生长
An analysis of circuit for quick understanding
【C#】使用正则校验内容
There are spaces in the for loop variable in the shell -- IFS variable
JPM 2021 most popular paper released (with download)
Construction and maintenance of business websites [13]
leetcode373. Find and minimum k-pair numbers (medium)
Software No.1