当前位置:网站首页>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 .
边栏推荐
- 【ESP 保姆级教程 预告】疯狂Node.js服务器篇 ——案例:ESP8266 + DHT11 +NodeJs本地服务+ MySQL数据库
- pcl_viewer命令
- Naoqi robot summary 28
- 2.3 [kaggle dataset - dog feed example] data preprocessing, rewriting dataset, dataloader reading data
- 【电赛训练】红外光通信装置 2013年电赛真题
- How to solve the problem of fixed assets management and inventory?
- 【pytorch】transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))
- 计网01-物理层
- 【pytorch】2.4 卷积函数 nn.conv2d
- 2022.02.15_ Daily question leetcode six hundred and ninety
猜你喜欢

Installation and use of NoSQL database

Daily practice of C language - day 80: currency change

Bird recognition app

Which method is good for the management of fixed assets of small and medium-sized enterprises?

NoSQL数据库的安装和使用

Redis -- lattice connects to redis cluster

集成积木报表报错 org.apache.catalina.core.StandardContext.filterStart 启动过滤器异常

An overview of the design of royalties and service fees of mainstream NFT market platforms

3D打印Arduino 四轴飞行器

Why is the Ltd independent station a Web3.0 website!
随机推荐
2022.02.15_ Daily question leetcode six hundred and ninety
The jar package embedded with SQLite database is deployed by changing directories on the same machine, and the newly added database records are gone
3D打印Arduino 四轴飞行器
【pytorch学习】torch.device
[ESP nanny level tutorial preview] crazy node JS server - Case: esp8266 + DHT11 +nodejs local service + MySQL database
Latex插入的eps图片模糊解决方法
js函数arguments对象
How to solve the problem of fixed assets management and inventory?
MySQL optimization
Tree structure --- binary tree 1
ES6 decoupling top-level objects from windows
JS scope chain and closure
记一次redis超时
Simple load balancing with Nacos
【ESP 保姆级教程 预告】疯狂Node.js服务器篇 ——案例:ESP8266 + DHT11 +NodeJs本地服务+ MySQL数据库
Win7 pyinstaller reports an error DLL load failed while importing after packaging exe_ Socket: parameter error
JS prototype chain
[video game training] real topic of 2013 video game of infrared optical communication device
The fixed assets management system enables enterprises to dynamically master assets
js原型继承仅可继承实例而非构造器