当前位置:网站首页>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 .
边栏推荐
- Implementation and application of queue
- NiO zero copy
- JS原型链
- 集成积木报表报错 org.apache.catalina.core.StandardContext.filterStart 启动过滤器异常
- Which method is good for the management of fixed assets of small and medium-sized enterprises?
- dsPIC30F6014a LCD 方块显示
- Error org apache. catalina. core. StandardContext. FilterStart start filter exception
- Installation and use of NoSQL database
- Mysql8.0 learning record 17 -create table
- js函数arguments对象
猜你喜欢

nacos簡易實現負載均衡

Mise en œuvre simple de l'équilibrage de la charge par nacos

ESP8266 FreeRTOS开发环境搭建

【pytorch】nn. Crossentropyloss() and nn NLLLoss()

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

2022.02.15_ Daily question leetcode six hundred and ninety

3D打印Arduino 四轴飞行器

MapReduce编程基础
![2.3 [kaggle dataset - dog feed example] data preprocessing, rewriting dataset, dataloader reading data](/img/6e/d8ef618127ac492f5142f7b600266d.png)
2.3 [kaggle dataset - dog feed example] data preprocessing, rewriting dataset, dataloader reading data

NoSQL数据库的安装和使用
随机推荐
【ESP 保姆级教程】疯狂毕设篇 —— 案例:基于阿里云、小程序、Arduino的温湿度监控系统
【pytorch】transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))
3D打印Arduino 四轴飞行器
树结构---二叉树2非递归遍历
[ESP nanny level tutorial] crazy completion chapter - Case: chemical environment system detection based on Alibaba cloud and Arduino, supporting nail robot alarm
【电赛训练】红外光通信装置 2013年电赛真题
js原型陷阱
Jetson nano installs tensorflow GPU and problem solving
[ESP nanny level tutorial preview] crazy node JS server - Case: esp8266 + DHT11 +nodejs local service + MySQL database
【ESP 保姆级教程】疯狂毕设篇 —— 案例:基于阿里云和Arduino的化学环境系统检测,支持钉钉机器人告警
【pytorch】2.4 卷积函数 nn.conv2d
【pytorch】softmax函数
2.3 【pytorch】数据预处理 torchvision.datasets.ImageFolder
ES6 const essence and completely immutable implementation (object.free)
js作用域链与闭包
【pytorch】nn.CrossEntropyLoss() 与 nn.NLLLoss()
【ESP 保姆级教程 预告】疯狂Node.js服务器篇 ——案例:ESP8266 + DS18B20温度传感器 +NodeJs本地服务+ MySQL数据库
Databinding source code analysis
Naoqi robot summary 28
Installation and use of NoSQL database