当前位置:网站首页>Wechat applet WebView prohibits page scrolling without affecting the implementation of overflow scrolling in the business
Wechat applet WebView prohibits page scrolling without affecting the implementation of overflow scrolling in the business
2022-07-01 09:19:00 【What about your long love~】
html,body{
position: fixed;
top:0;
left:0;
height: 100vh;
overflow: scroll;
}
Super simple implementation , But I adjusted it many times, but it didn't work , After studying for a long time, I found that the problem is page caching , So in head Tag loading css The file is written in the following way
<link type="text/css" rel="stylesheet" href="css/page.css?t=<?=filemtime("css/style.css")?>">
====================================
2020 year 6 month 28 Japan 16:03:03 modify
The above approach may be achievable , But in some cases, the sliding within the business also fails . Today, I have studied another set of methods, namely .
.bg {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
overflow: auto;
background-color: #fff;
}
<script type="text/javascript">
setInterval(function () {
$(".bg").focus();
console.log(1);
}, 500);
</script>
Explain it. , What I understand should not be completely correct Namely css Style can achieve the desired effect , But sometimes the page needs to slide dom Loss of focus , Cause failure to slide , You can use js The timer gives this dom Element get focus .
边栏推荐
- How to effectively align team cognition
- 序列化、监听、自定义注解
- js变量提升(hoisting)
- NoSQL数据库的安装和使用
- Record a redis timeout
- Preparing for the Blue Bridge Cup -- bit operation
- Jetson Nano 安装TensorFlow GPU及问题解决
- 2.4 激活函数
- Nacos service configuration and persistence configuration
- 【ESP 保姆级教程 预告】疯狂Node.js服务器篇 ——案例:ESP8266 + DHT11 +NodeJs本地服务+ MySQL数据库
猜你喜欢

Bird recognition app

Imitation of Baidu search results top navigation bar effect

Error org apache. catalina. core. StandardContext. FilterStart start filter exception

Design and manufacture of simple digital display electronic scale

Ranking list of domestic databases in February, 2022: oceanbase regained the "three consecutive increases", and gaussdb is expected to achieve the largest increase this month

Implementation and application of queue

2.3 【pytorch】数据预处理 torchvision.datasets.ImageFolder

ESP8266 FreeRTOS开发环境搭建

Vsync+ triple cache mechanism +choreographer

Principle and application of single chip microcomputer timer, serial communication and interrupt system
随机推荐
Principles of Microcomputer - Introduction
nacos简易实现负载均衡
js原型陷阱
Short circuit operator lazy evaluation
【pytorch】nn. Crossentropyloss() and nn NLLLoss()
[ESP nanny level tutorial preview] crazy node JS server - Case: esp8266 + DS18B20 temperature sensor +nodejs local service + MySQL database
小鸟识别APP
How to manage fixed assets well? Easy to point and move to provide intelligent solutions
闭包实现迭代器效果
【ESP 保姆级教程 预告】疯狂Node.js服务器篇 ——案例:ESP8266 + DHT11 +NodeJs本地服务+ MySQL数据库
Jetson Nano 安装TensorFlow GPU及问题解决
Exception handling of classes in C #
[interview brush 101] linked list
The jar package embedded with SQLite database is deployed by changing directories on the same machine, and the newly added database records are gone
2.2 【pytorch】torchvision.transforms
[video game training] real topic of 2013 video game of infrared optical communication device
Football and basketball game score live broadcast platform source code /app development and construction project
Shell script - string
Record a redis timeout
ES6-const本质与完全不可改实现(Object.freeze)