当前位置:网站首页>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-Task Computing (排序+动态规划)
MySQL-DML语言-数据库操作语言-insert-update-delete-truncate
What should I do if the neural network cannot be trained?
DL-31/6电流继电器
MySQL-Data Definition Language-DDLdatebase define language
Induction jian hai JustFE 2022/07/29 team, I learned the efficient development summary (years)
Swastika line-by-line parsing and realization of the Transformer, and German translation practice (a)
2022年湖南工学院ACM集训第六次周测题解
状态压缩dp
MySQL-Data Operation-Group Query-Join Query-Subquery-Pagination Query-Joint Query
随机推荐
WPF入门项目必知必会-初步了解数据绑定 binding
微信小程序获取手机号phonenumber.getPhoneNumber接口开发
pytorch、tensorflow对比学习—功能组件(激活函数、模型层、损失函数)
The sword refers to Offer 68 - I. Nearest Common Ancestor of Binary Search Trees
使用string 容器翻转 字母
Selenium: browser operation
万字逐行解析与实现Transformer,并进行德译英实战(二)
MySQL Practice Summary -
关于给Qt做一个软件初始化的进度条
MySQL-数据定义语言-DDLdatebase define language
Seleniu:元素常用操作
MySQL-DML language-database operation language-insert-update-delete-truncate
Selenium:浏览器操作
AspNet.WebApi.Owin custom Token request parameters
Robot_Framework:常用内置关键字
HJS-DE1/2时间继电器
2022年超全的Android面经(附含面试题|进阶资料)
4D line-by-line analysis and implementation of Transformer, and German translation into English (3)
万字逐行解析与实现Transformer,并进行德译英实战(三)
用位运算为你的程序加速