当前位置:网站首页>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);边栏推荐
猜你喜欢

The Sandbox 和艺术家 Alec Monopoly 达成合作

Definition and use of one-dimensional array

go+mysql+redis+vue3简单聊室,第6弹:使用vue3和element-plus调用接口

Kotlin - 协程上下文 CoroutineContext

【JVM 系列】JVM 调优

EtherCAT synchronization mode

Vs how to read data in MySQL (by the way, the problem of Chinese garbled code is solved through code)

URL format

第一次培训课完美成功(๑•ㅂ•)و*

App Uploader下载安装
随机推荐
使用百度飞桨 EasyDL 完成垃圾分类
潘多尼亚精灵 VoxEdit 创作大赛
小场景带来大提升!百度飞桨EasyDL助力制造业流水线AI升级
Typescrip异步函数Promise使用
.net GC workflow
Cookie和Session
numpy.zeros_ like
试用了多款报表工具,终于找到了基于.Net 6开发的一个了
Kingbasees SQL language reference manual of Jincang database (19. SQL statement: drop table to load)
Three implementation methods of C # client program calling external program
SwiftUI 4 新功能之实时获取点击位置 .onTapGesture { location in} (教程含源码)
事务回滚,同时记录异常信息
Kingbases SQL language reference manual of Jincang database (16. SQL statement: create sequence to delete)
同花顺靠谱吗?我刚开始学习理财,开证券账户安全吗?
一文读懂 Kubernetes的四种服务类型!
第一次培训课完美成功(๑•ㅂ•)و*
Jincang database kingbasees SQL language reference manual (18. SQL statement: drop materialized view to drop synonym)
Silent desktop fan chip dltap703sd Jericho
Using questpdf operation to generate PDF is faster and more efficient!
numpy.put()