当前位置:网站首页>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 .
边栏推荐
- delete和delete[]引发的问题
- Shell script - special variables: shell $, $*, [email protected], $$$
- Latex插入的eps图片模糊解决方法
- R language observation log (part24) -- initialization settings
- Promise asynchronous programming
- 【pytorch】2.4 卷积函数 nn.conv2d
- Principle and application of single chip microcomputer timer, serial communication and interrupt system
- [interview brush 101] linked list
- 【ESP 保姆级教程】疯狂毕设篇 —— 案例:基于阿里云、小程序、Arduino的温湿度监控系统
- 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
猜你喜欢

JS原型链

Installation and use of NoSQL database

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

【pytorch】nn.CrossEntropyLoss() 与 nn.NLLLoss()

【pytorch】2.4 卷积函数 nn.conv2d

MySQL optimization

OSPF - virtual link details (including configuration commands)

树结构---二叉树2非递归遍历
![delete和delete[]引发的问题](/img/d9/a1c3e5ce51ef1be366a973aa42d1f0.png)
delete和delete[]引发的问题

Bird recognition app
随机推荐
【pytorch】transforms. Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))
2.4 activation function
In the middle of the year, where should fixed asset management go?
Why is the Ltd independent station a Web3.0 website!
2.3 [pytorch] data preprocessing torchvision datasets. ImageFolder
ES6 decoupling top-level objects from windows
树结构---二叉树2非递归遍历
[pytorch learning] torch device
Installation and use of NoSQL database
JS functionarguments object
js原型陷阱
SDN_ Simple summary
序列化、监听、自定义注解
ES6 const essence and completely immutable implementation (object.free)
JS variable lifting
短路运算符惰性求值
MySQL optimization
es6-顶层对象与window的脱钩
js作用域链与闭包
laravel postman 提交表单出现419错误。2020年7月6日记。