当前位置:网站首页>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] crazy completion chapter - Case: gy906 infrared temperature measurement access card swiping system based on the Internet of things
- Differences between JS valueof and toString
- 【检测技术课案】简易数显电子秤的设计与制作
- 树结构---二叉树2非递归遍历
- 钓鱼识别app
- Serialization, listening, custom annotation
- 【pytorch学习】torch.device
- js原型陷阱
- Pain points and solutions of equipment management in large factories
- 【pytorch】2.4 卷积函数 nn.conv2d
猜你喜欢
How to launch circle of friends marketing and wechat group activities
3D printing Arduino four axis aircraft
Mise en œuvre simple de l'équilibrage de la charge par nacos
delete和delete[]引发的问题
[pytorch] 2.4 convolution function nn conv2d
Which method is good for the management of fixed assets of small and medium-sized enterprises?
JS scope chain and closure
Why is the Ltd independent station a Web3.0 website!
【检测技术课案】简易数显电子秤的设计与制作
Simple load balancing with Nacos
随机推荐
Is it safe to dig up money and make new shares
2.3 【pytorch】数据预处理 torchvision.datasets.ImageFolder
Using closures to implement private variables
【pytorch】transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))
nacos服务配置和持久化配置
【ESP 保姆级教程】疯狂毕设篇 —— 案例:基于阿里云、小程序、Arduino的温湿度监控系统
Design and manufacture of simple digital display electronic scale
LeetCode 344. Reverse string
Differences between JS valueof and toString
Microcomputer principle - bus and its formation
Mysql8.0 learning record 17 -create table
Daily practice of C language - day 80: currency change
【检测技术课案】简易数显电子秤的设计与制作
Imitation of Baidu search results top navigation bar effect
Promise asynchronous programming
Analysis and solution of JS this loss
2.4 激活函数
How to solve the problem of fixed assets management and inventory?
SDN_简单总结
pcl_ Viewer command