当前位置:网站首页>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 nanny level tutorial preview] crazy node JS server - Case: esp8266 + DS18B20 temperature sensor +nodejs local service + MySQL database
- 序列化、监听、自定义注解
- Structure de l'arbre - - - arbre binaire 2 traversée non récursive
- Bird recognition app
- LeetCode 344. Reverse string
- JS prototype chain
- pcl_ Viewer command
- How to solve the problem of fixed assets management and inventory?
- I use flask to write the website "one"
- es6-顶层对象与window的脱钩
猜你喜欢

Pain points and solutions of equipment management in large factories

Redis -- lattice connects to redis cluster

js作用域链与闭包

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

Installation and use of NoSQL database

JS scope chain and closure
![2.3 [pytorch] data preprocessing torchvision datasets. ImageFolder](/img/19/cce8d8a7cdcb1021166c46adf803c1.png)
2.3 [pytorch] data preprocessing torchvision datasets. ImageFolder

Principles of Microcomputer - internal and external structure of microprocessor

NoSQL数据库的安装和使用

2022.02.15_ Daily question leetcode six hundred and ninety
随机推荐
韦东山板子编译内核问题解决
[ESP nanny level tutorial] crazy completion chapter - Case: temperature and humidity monitoring system based on Alibaba cloud, applet and Arduino
Understand shallow replication and deep replication through code examples
Error org apache. catalina. core. StandardContext. FilterStart start filter exception
利用闭包实现私有变量
js作用域链与闭包
闭包实现迭代器效果
Niuke monthly race 22 tree sub chain
[pytorch learning] torch device
Is it safe to dig up money and make new shares
序列化、监听、自定义注解
Promise asynchronous programming
Tree structure --- binary tree 1
Shell script -read command: read data entered from the keyboard
2022.02.15_ Daily question leetcode six hundred and ninety
Summary of reptile knowledge points
Mysql8.0 learning record 17 -create table
Serialization, listening, custom annotation
【ESP 保姆级教程 预告】疯狂Node.js服务器篇 ——案例:ESP8266 + DHT11 +NodeJs本地服务+ MySQL数据库
ES6 const essence and completely immutable implementation (object.free)