当前位置:网站首页>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 .
边栏推荐
- Short circuit operator lazy evaluation
- ESP8266 FreeRTOS开发环境搭建
- How to solve the problem of fixed assets management and inventory?
- 序列化、监听、自定义注解
- Can diffusion models be regarded as an autoencoder?
- 【pytorch学习】torch.device
- Preparing for the Blue Bridge Cup -- bit operation
- LeetCode 344. Reverse string
- ES6 decoupling top-level objects from windows
- 3D printing Arduino four axis aircraft
猜你喜欢
[video game training] real topic of 2013 video game of infrared optical communication device
【电赛训练】红外光通信装置 2013年电赛真题
Why is the Ltd independent station a Web3.0 website!
队列的实现和应用
nacos簡易實現負載均衡
Learning practice: comprehensive application of cycle and branch structure (II)
2.2 【pytorch】torchvision.transforms
Principles of Microcomputer - internal and external structure of microprocessor
Principle and application of single chip microcomputer timer, serial communication and interrupt system
樹結構---二叉樹2非遞歸遍曆
随机推荐
Meituan machine test in 2022
Youqitong PE toolbox [vip] v3.7.2022.0106 official January 22 Edition
Understand shallow replication and deep replication through code examples
Vsync+ triple cache mechanism +choreographer
[ESP nanny level tutorial preview] crazy node JS server - Case: esp8266 + DS18B20 temperature sensor +nodejs local service + MySQL database
Tree structure -- binary tree 2 non recursive traversal
[video game training] real topic of 2013 video game of infrared optical communication device
【ESP 保姆级教程】疯狂毕设篇 —— 案例:基于物联网的GY906红外测温门禁刷卡系统
ESP8266 FreeRTOS开发环境搭建
Flink interview questions
【ESP 保姆级教程 预告】疯狂Node.js服务器篇 ——案例:ESP8266 + DHT11 +NodeJs本地服务+ MySQL数据库
[ESP nanny level tutorial] crazy completion chapter - Case: temperature and humidity monitoring system based on Alibaba cloud, applet and Arduino
nacos服务配置和持久化配置
Using closures to implement private variables
Shell script case in and regular expressions
Daily practice of C language - day 80: currency change
Promise asynchronous programming
Win7 pyinstaller reports an error DLL load failed while importing after packaging exe_ Socket: parameter error
【ESP 保姆级教程】疯狂毕设篇 —— 案例:基于阿里云、小程序、Arduino的WS2812灯控系统
[interview brush 101] linked list