当前位置:网站首页>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;
}
边栏推荐
- leetcode373. 查找和最小的 K 对数字(中等)
- leetcode2305. Fair distribution of biscuits (medium, weekly, shaped pressure DP)
- Construction and maintenance of business websites [11]
- leetcode2312. 卖木头块(困难,周赛)
- Redis环境搭建和使用的方法
- WebGPU(一):基本概念
- Software development life cycle -- waterfall model
- Exception handling of class C in yyds dry goods inventory
- Ar Augmented Reality applicable scenarios
- flutter 中间一个元素,最右边一个元素
猜你喜欢

Decipher the AI black technology behind sports: figure skating action recognition, multi-mode video classification and wonderful clip editing

SQLite 3 of embedded database

剑指 Offer 62. 圆圈中最后剩下的数字

leetcode373. Find and minimum k-pair numbers (medium)

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

How does MySQL solve the problem of not releasing space after deleting a large amount of data

【视频】马尔可夫链蒙特卡罗方法MCMC原理与R语言实现|数据分享

How to use redis ordered collection

MySQL主从延迟问题怎么解决

If you want to rewind the video picture, what simple methods can you use?
随机推荐
剑指 Offer 42. 连续子数组的最大和
【视频】马尔可夫链原理可视化解释与R语言区制转换MRS实例|数据分享
leetcode373. 查找和最小的 K 对数字(中等)
DNS domain name resolution
Volume compression, decompression
SQLite 3 of embedded database
STM32F103 - two circuit PWM control motor
Cross domain? Homology? Understand what is cross domain at once
OpenCASCADE7.6编译
leetcode2311. 小于等于 K 的最长二进制子序列(中等,周赛)
分卷压缩,解压
Using mongodb in laravel
WebGPU(一):基本概念
大学的知识是否学而无用、过时?
Ar Augmented Reality applicable scenarios
Openssl3.0 learning XXI provider encoder
With the innovation and upgrading of development tools, Kunpeng promotes the "bamboo forest" growth of the computing industry
leetcode2309. The best English letters with both upper and lower case (simple, weekly)
CSDN article underlined, font color changed, picture centered, 1 second to understand
An analysis of circuit for quick understanding