当前位置:网站首页>Solve the problem of page flicker caused by browser scroll bars
Solve the problem of page flicker caused by browser scroll bars
2022-08-01 05:22:00 【collector】
Fix the page flickering problem caused by browser scroll bars
Description
When my webpage was initially loaded, the content of the webpage did not occupy the entire height. As I added content later, when the content was close to the bottom of the browser, the scroll bar suddenly appeared, and the page flickered.
css solution
1 Mode 1
/*method 1 recommended*/.wrap-outer{margin-left: calc(100vw - 100%);}
First, .wrap-outer refers to the parent of the centered fixed-width body, if not, create one.
If the flicker is caused by the global scroll bar, you can also try setting it to thebody
tag, but test it yourself.
like mybody{ margin-left: calc(100vw - 100%); }
2 Method 2 Style html
html{margin-right: calc(100% - 100vw);overflow-x: hidden;}
Method 2 After my test, the browser will not flicker, but it will cause the scroll bar below me
not
to appear.
边栏推荐
- HJS-DE1/2时间继电器
- Selenium:元素定位
- 将CSV文件快速导入MySQL中
- What should I do if the neural network cannot be trained?
- (2022 Nioke Duo School IV) D-Jobs (Easy Version) (3D prefix or)
- 第5章——以程序方式处理MySQL数据表的数据
- (more than 2022 cattle school four) A - Task Computing + dynamic programming (sort)
- 七、MFC序列化机制和序列化类对象
- ORACLE 实现另外一个用户修改包(package)
- WPF入门项目必知必会-初步了解数据绑定 binding
猜你喜欢
字符中的第一个唯一字符
AspNet.WebApi.Owin custom Token request parameters
关于给Qt做一个软件初始化的进度条
SL-12/2过流继电器
2022.7.26 Mock Competition
The solution to the inconsistency between the PaddleX deployment inference model and the GUI interface test results
类神经网络训练不起来怎么办
Selenium: Popup Handling
II. Binary tree to Offer 68 - recent common ancestor
pytroch、tensorflow对比学习—搭建模型范式(低阶、中阶、高阶API示例)
随机推荐
类神经网络训练不起来怎么办
牛客多校2022第四场A,H,K,N
WPF入门项目必知必会-初步了解数据绑定 binding
Selenium: Manipulating Cookies
WebSocket实现聊天功能
HJS-DE1/2时间继电器
混合型界面:对话式UI的未来
DL-31/6电流继电器
MySQL-数据操作-分组查询-连接查询-子查询-分页查询-联合查询
Selenium: element positioning
Selenium: Element wait
pytroch、tensorflow对比学习—专栏介绍
PAT乙级 1002 写出这个数
PAT serie b write the number 1002
pytorch、tensorflow对比学习—张量
Selenium:简介
matplotlib pyplot
七、MFC序列化机制和序列化类对象
LeetCode 1189. “气球” 的最大数量
从离线到实时对客,湖仓一体释放全量数据价值