分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > IT知识

fullpage.js的easing参数怎样配置自定义动画

发布时间:2023-09-06 01:40责任编辑:赖小花关键词:js配置动画

首先看非官方文档

并没有详细的说明怎样去使用easing.js,所以我加的运动属性根本就不起作用,

再看,官方文档

Optionally, when using css3:false, you can add the jQuery UI library in case you want to use other easing effects apart from the ones included in the jQuery library (linear and swing ) or the one included by default in fullPage.js (easeInOutCubic).

译文:可选地,当使用时css3:false,您可以添加jQuery UI库,以防您希望使用除jQuery库(linear和swing)中包含的其他缓动效果或默认情况下在fullPage.js(easeInOutCubic)中包含的其他效果)。

因此只需像下面这样就好了

1.引入fullPage.js插件的css样式

<link rel="stylesheet" href="css/jquery.fullPage.css">

2.引入jQuery文件,fullPage.js,运动函数easing

<script src="js/jquery-1.8.3.min.js"></script><script src="js/jquery.easing.1.3.min.js"></script><script src="js/jquery.fullPage.min.js"></script>

3.重点是

<script> ???$(‘.main‘).fullpage({ ???????css3:false,//需要把这个值设置为false ???????easing:‘easeOutBounce‘//之后你就可以随意选择easing.js里面的动画效果名称了 ???})</script>

fullpage.js的easing参数怎样配置自定义动画

原文地址:https://www.cnblogs.com/libijun96/p/8407128.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved