scrollToSmooth.js锚点滚动插件右侧圆点

scrollToSmooth.js锚点滚动插件右侧圆点源码下载

看看谁在用

查看文件结构

文件大小:0.01M

资源分类: 插件-其它前端代码

更新时间: 2021-01-06

scrollToSmooth.js是一个纯JS平滑滚动动画,页面滚动到指定的锚点链接。适用于粘性的导航栏。

引用js类库
<script src="./dist/scrolltosmooth.js"></script>
创建锚点标记
<nav>
  <a href="#section-1">Section 1</a>
  <a href="#section-2">Section 2</a>
  <a href="#section-3">Section 3</a>
  <a href="#section-4">Section 4</a>
  <a href="#section-5">Section 5</a>
</nav>
初始化调用插件
var smoothScroll = new scrollToSmooth('a')
smoothScroll.init();
可以指定动画时间
var smoothScroll = new scrollToSmooth('a',{
    duration: 500
})
还能指定动画效果
var smoothScroll = new scrollToSmooth('a',{
    easing: "linear" //linear easeInQuad easeOutQuad easeInOutQuad easeInCubic easeOutCubic easeInOutCubic easeInQuart easeOutQuart easeInOutQuart easeInQuint easeOutQuint easeInOutQuint easeInSine easeOutSine easeInOutSine easeInExpo easeOutExpo easeInOutExpo easeInCirc easeOutCirc easeInOutCirc easeInElastic easeOutElastic easeInOutElastic easeInBack easeOutBack easeInOutBack easeInBounce easeOutBounce easeInOutBounce
})
 回调方法
var smoothScroll = new scrollToSmooth('a',{
    callback: function () { 
      console.log('we reached it!'); 
    }
})

scrollToSmooth.js锚点滚动插件右侧圆点

正在加载文件目录...

也许你还喜欢

  1. jQuery粘性固定导航菜单位置插件
  2. jQuery垂直圆点页面切换单页滚动
  3. 纯css3网页平滑滚动布局效果
  4. jQuery单页内容滚动切换插件
  5. 仿某支付网首页模板HTML
  6. js右侧圆点单页滚动介绍页面
css美化Toggle开关选择按钮
  • 标签查找|关于我们|格式化工具|bootstrapmb.com 版权所有 苏ICP备17077179号-2