当前位置:网站首页>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;
}
边栏推荐
- MySQL约束与多表查询实例分析
- Based on configured schedule, the given trigger will never fire
- [Video] visual interpretation of Markov chain principle and Mrs example of R language region conversion | data sharing
- Post infiltration flow encryption
- Medical management system (C language course for freshmen)
- 【视频】马尔可夫链蒙特卡罗方法MCMC原理与R语言实现|数据分享
- Exception handling of class C in yyds dry goods inventory
- [Video] Markov chain Monte Carlo method MCMC principle and R language implementation | data sharing
- Golang lock
- Types of exhibition items available in the multimedia interactive exhibition hall
猜你喜欢

No programming code technology! Four step easy flower store applet

What are the necessary things for students to start school? Ranking list of Bluetooth headsets with good sound quality

How to execute an SQL in MySQL

734. Energy stone (greed, backpack)

医药管理系统(大一下C语言课设)

开发工具创新升级,鲲鹏推进计算产业“竹林”式生长

研发中台拆分过程的一些心得总结

Redis有序集合如何使用

Software development life cycle -- waterfall model

RTL8189FS如何关闭Debug信息
随机推荐
【LeetCode 43】236. The nearest common ancestor of binary tree
With the innovation and upgrading of development tools, Kunpeng promotes the "bamboo forest" growth of the computing industry
The concepts and differences between MySQL stored procedures and stored functions, as well as how to create them, the role of delimiter, the viewing, modification, deletion of stored procedures and fu
Iterative unified writing method of binary tree
5g/4g pole gateway_ Smart pole gateway
Selection of field types for creating tables in MySQL database
MySQL主从延迟问题怎么解决
[Video] visual interpretation of Markov chain principle and Mrs example of R language region conversion | data sharing
【视频】马尔可夫链蒙特卡罗方法MCMC原理与R语言实现|数据分享
The difference between new and malloc
Number of palindromes in C language (leetcode)
* and & symbols in C language
How to turn off debug information in rtl8189fs
Opencascade7.6 compilation
Failed to transform file 'xxx' to match attributes
AR增强现实可应用的场景
SQLite 3 of embedded database
[deep learning] Infomap face clustering facecluster
How to batch add background and transition effects to videos?
【OpenCV】-5种图像滤波的综合示例