当前位置:网站首页>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.
边栏推荐
- Selenium: browser operation
- 微信小程序用户登录auth.code2Session接口开发
- Selenium:上传、下载文件
- pytroch、tensorflow对比学习—专栏介绍
- vsce package 后出现 Command failed: npm list --production --parseable --depth=99999 --loglevel=error异常
- Selenium: element positioning
- Induction jian hai JustFE 2022/07/29 team, I learned the efficient development summary (years)
- [MySQL] 多表查询
- Selenium:元素定位
- PAT乙级 1002 写出这个数
猜你喜欢
(2022牛客多校四)K-NIO‘s Sword(思维)
The sword refers to Offer 68 - I. Nearest Common Ancestor of Binary Search Trees
剑指 Offer 68 - II. 二叉树的最近公共祖先
DL-31/6电流继电器
The solution to the inconsistency between the PaddleX deployment inference model and the GUI interface test results
(2022牛客多校四)H-Wall Builder II(思维)
What should I do if the neural network cannot be trained?
USB3.0:VL817Q7-C0的LAYOUT指南(二)
(2022牛客多校四)N-Particle Arts(思维)
MySQL-数据操作-分组查询-连接查询-子查询-分页查询-联合查询
随机推荐
备战金九银十,如何顺利通过互联网大厂Android的笔面试?
说说js中使用for in遍历数组存在的bug
leetcode125 验证回文串
Robot_Framework: keyword
(2022牛客多校四)N-Particle Arts(思维)
(2022 Nioke Duo School IV) H-Wall Builder II (Thinking)
解决浏览器滚动条导致的页面闪烁问题
Selenium:简介
vim configuration + ctag is as easy to read code as source insight
Power button (LeetCode) 212. The word search II (2022.07.31)
MySQL-数据定义语言-DDLdatebase define language
PAT乙级 1002 写出这个数
从离线到实时对客,湖仓一体释放全量数据价值
Selenium: Introduction
PAT serie b write the number 1002
微信小程序获取手机号phonenumber.getPhoneNumber接口开发
vsce package 后出现 Command failed: npm list --production --parseable --depth=99999 --loglevel=error异常
Use controls as brushes to get bitmap code records
(Codeforce 757)E. Bash Plays with Functions(积性函数)
MySQL-DML语言-数据库操作语言-insert-update-delete-truncate