当前位置:网站首页>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.
边栏推荐
- 小心你的字典和样板代码
- 牛客多校2022第四场A,H,K,N
- ModuleNotFoundError: No module named 'tensorflow.keras' error message solution
- pytorch、tensorflow对比学习—功能组件(优化器、评估指标、Module管理)
- leetcode125 验证回文串
- 使用string 容器翻转 字母
- Seleniu: Common operations on elements
- state compressed dp
- 微信小程序接口调用凭证(获取token)auth.getAccessToken接口开发
- Jupyter shortcuts
猜你喜欢
pytroch、tensorflow对比学习—使用GPU训练模型
(Codeforce 757)E. Bash Plays with Functions(积性函数)
2022.7.26 Mock Competition
MySQL-DML语言-数据库操作语言-insert-update-delete-truncate
leetcode43 字符串相乘
(2022牛客多校四)D-Jobs (Easy Version)(三维前缀或)
对话MySQL之父:一个优秀程序员可抵5个普通程序员
数据湖:数据同步工具NiFi
万字逐行解析与实现Transformer,并进行德译英实战(一)
USB3.0:VL817Q7-C0的LAYOUT指南(三)
随机推荐
LeetCode 9. 回文数
Robot_Framework: Assertion
使用string 容器翻转 字母
微信小程序用户登录auth.code2Session接口开发
WPF项目-按着键盘方向键,移动格子盒子效果
SL-12/2过流继电器
可持久化线段树
MySQL-数据定义语言-DDLdatebase define language
Selenium:元素定位
Causes and solutions of lock table
【音视频】srs直播平台搭建
2022年超全的Android面经(附含面试题|进阶资料)
(2022 Nioke Duo School IV) H-Wall Builder II (Thinking)
[target detection] YOLOv7 theoretical introduction + practical test
matplotlib pyplot
leetcode43 字符串相乘
pytorch、tensorflow对比学习—功能组件(激活函数、模型层、损失函数)
Robot_Framework:关键字
PAT乙级 1001 害死人不偿命的(3n+1)猜想
Asynchronous reading and writing of files