当前位置:网站首页>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;
}
边栏推荐
- How to use redis ordered collection
- Sword finger offer II 031 Least recently used cache
- [技术发展-21]:网络与通信技术的应用与发展快速概览-1- 互联网网络技术
- Sword finger offer 29 Print matrix clockwise
- 剑指 Offer 29. 顺时针打印矩阵
- Construction and maintenance of business websites [14]
- Sword finger offer 42 Maximum sum of continuous subarrays
- What is the MySQL column to row function
- No programming code technology! Four step easy flower store applet
- [Video] Markov chain Monte Carlo method MCMC principle and R language implementation | data sharing
猜你喜欢

Which is a good Bluetooth headset of about 300? 2022 high cost performance Bluetooth headset inventory

如何用一款产品推动「品牌的惊险一跃」?

How to build and use redis environment

WebGPU(一):基本概念

golang---锁

1222. Password dropping (interval DP, bracket matching)

mysql列转行函数指的是什么

JPM 2021 most popular paper released (with download)

If you want to rewind the video picture, what simple methods can you use?
![[graduation season] graduate seniors share how to make undergraduate more meaningful](/img/03/9adc44476e87b2499aa0ebb11cb247.png)
[graduation season] graduate seniors share how to make undergraduate more meaningful
随机推荐
DNS domain name resolution
[question] - why is optical flow not good for static scenes
[Video] visual interpretation of Markov chain principle and Mrs example of R language region conversion | data sharing
PR second training
如何远程、在线调试app?
Construction and maintenance of business websites [13]
SQL server calculates the daily average and annual average of the whole province
Open那啥的搭建文档
[graduation season] graduate seniors share how to make undergraduate more meaningful
【LeetCode 43】236. The nearest common ancestor of binary tree
If you want to rewind the video picture, what simple methods can you use?
Software development life cycle -- waterfall model
New news, Wuhan Yangluo international port, filled with black technology, refreshes your understanding of the port
Types of exhibition items available in the multimedia interactive exhibition hall
flutter 中間一個元素,最右邊一個元素
leetcode2312. Selling wood blocks (difficult, weekly race)
Webgpu (I): basic concepts
C language 3-7 daffodils (enhanced version)
【深度学习】infomap 人脸聚类 facecluster
flutter 中间一个元素,最右边一个元素