当前位置:网站首页>Usage of Smoothscroll Polyfill plug-in
Usage of Smoothscroll Polyfill plug-in
2022-07-26 20:25:00 【YingUser】
Using this plug-in can achieve the effect of sliding , The specific steps are as follows :
1、npm download
npm install smoothscroll-polyfill --save2、 stay main.js Global import in
import smoothscroll from "smoothscroll-polyfill"
smoothscroll.polyfill();3、 Use on the current page to introduce
import smoothscroll from 'smoothscroll-polyfill';
The specific main codes are as follows :
// notes : there order-lock It is the class name of the label that needs to jump to
this.timer = setTimeout(() => {
smoothscroll.polyfill();
document
.getElementsByClassName('order-lock')[0]
.scrollIntoView({ block: 'start', inline: 'center', behavior: 'smooth' });
}, 3000);边栏推荐
猜你喜欢
随机推荐
2000 words to help you master anti shake and throttling
.NET GC工作流程
内网渗透学习(二)信息收集
Dio problem summary
Three implementation methods of C # client program calling external program
Cookie和Session
直播预约有奖| 高级咨询顾问徐雁斐:效能度量如何助力高效精细的外包管理
.net GC workflow
mysql使用union 排序问题
Using questpdf operation to generate PDF is faster and more efficient!
This points to the simplest rule remember it
There is an Oolong incident in open source. Maybe you don't know these five open source protocols
numpy.put()
用 QuestPDF操作生成PDF更快更高效!
GBase学习-安装GBase 8a MPP Cluster V95
Is flush reliable? I just started to learn financial management. Is it safe to open a securities account?
打字比赛圆满结束!
【OBS】解决OBS推两个rtmp流 + 带时间戳问题
EFCore Migrations的深入研究
QT驾校科目考试系统——从实现到发布









