html5 strongeaseinout,html5杯子里萤火虫发光动画特效
js代码
var numP = 50;
TweenMax.set("#content", {transformOrigin:"50% -45%"})
//TweenMax.fromTo("#particles", .7, {background:'rgb(16,17,24)'}, {background:'rgb(18,15,23)', repeat:-1, yoyo:true, ease:Elastic.easeInOut})
for (var i = 0; i<=numP; i++) {
if (i==0){
TweenMax.set("#p0", {scale:0})
//loop(document.getElementById('p0'), 0);
}
else {
var _p = document.getElementById('p0').cloneNode(false);
_p.id = "p" + i;
document.getElementById('particles').appendChild(_p);
TweenMax.fromTo(_p, 13, {
x:120+110*Math.random(),
y:200+250*Math.random(),
scale:3*Math.random()
},{
bezier:{ type:'thru', values:[
{x:99+60*Math.random(), y:50+100*Math.random(), scale:.5+Math.random(), alpha:1},
{x:40+80*Math.random(), y:200+160*Math.random(), scale:3-Math.random(), alpha:0.25},
{x:60+60*Math.random(), y:390+50*Math.random(), scale:3*Math.random(), alpha:.7+.3*Math.random()}],
},
onComplete:loop,
onCompleteParams:[_p],
ease:Sine.easeInOut
}).progress(i/numP)
}
}
function loop(_p){
var tl = new TimelineMax({yoyo:true, repeat:-1})
//.to(_p, 3, {x:100+50*Math.random(), y:380+50*Math.random(), scale:1+2*Math.random(), ease:Linear.easeNone}, 0)
.to(_p, 14, {
ease:Sine.easeInOut,//Linear.easeNone,
bezier:{ type:'thru', values:[
{x:190+30*Math.random(), y:100+60*Math.random(), scale:3-Math.random()},
{x:190+50*Math.random(), y:150+100*Math.random(), scale:.5+Math.random(), alpha:1},
{x:190-60*Math.random(), y:200+160*Math.random(), scale:3-Math.random(), alpha:0.25},
{x:200-70*Math.random(), y:390+50*Math.random(), scale:3*Math.random(), alpha:1}],
}})
}
window.addEventListener('mousemove',function(e){
TweenMax.to("#content", .5, {x:-400+800*(e.clientX/window.innerWidth), rotation:-25+50*(e.clientX/window.innerWidth)})
})
html5 strongeaseinout,html5杯子里萤火虫发光动画特效相关推荐
- html 萤火虫特效,html5+CSS3杯子里萤火虫发光动画特效
html5+CSS3杯子里萤火虫发光动画特效 js代码 var numP = 50; TweenMax.set("#content", {transformOrigin:" ...
- html 萤火虫特效,html5杯子里萤火虫发光动画特效
js代码 var numP = 50; TweenMax.set("#content", {transformOrigin:"50% -45%"}) //Twe ...
- html 萤火虫特效,html5关在杯子里萤火虫动画特效
特效描述:html5 萤火虫动画特效.html5关在杯子里跟随鼠标摇晃的萤火虫发光动画特效. 代码结构 1. 引入JS 2. HTML代码 var numP = 50; TweenMax.set(&q ...
- html 文字悬停翻转,html5+TweenMax.js鼠标悬停文字翻转动画特效
8种动画效果十分流畅的html5+TweenMax.js鼠标悬停文字翻转动画特效,支持英文字母和中文汉字. 查看演示 下载资源: 14 次 下载资源 下载积分: 20 积分 js代码 const le ...
- html怎么设置点击播放音乐,html5点击播放音乐试听按钮动画特效
特效描述:html5 点击播放 音乐试听 按钮动画特效.html5鼠标滑过或点击播放音乐试听特效 代码结构 1. 引入CSS 2. 引入JS 3. HTML代码 Examples eventType ...
- html5圆圈闪烁,html5 css3圆形波浪百分比加载动画特效
一款简单漂亮的html5 css3圆形波浪百分比加载动画特效,非常好看的波浪滚动上升动画效果,也可用于百分比展示. 查看演示 下载资源: 28 次 下载资源 下载积分: 20 积分 js代码 var ...
- html5 canvas酷炫3D背景打开动画特效
html5 canvas酷炫3D背景打开动画特效 点击跳转到演示地址 点击进入资源下载地址
- html5 特效 背景 腾讯,html5腾讯QQ登录界面背景动画特效
特效描述:html5 腾讯QQ 登录界面 背景动画特效.腾讯QQ登陆界面动态背景,直接从腾讯网站获取,js代码有加密,做了个简单地示例 代码结构 1. 引入JS 2. HTML代码 *{margin: ...
- HTML粒子碰撞烟花,html5 canvas漂亮的粒子烟花背景动画特效
特效描述:html5 canvas 漂亮的粒子烟花 背景动画特效.html5 canvas漂亮的粒子烟花背景动画特效 代码结构 1. HTML代码 class Vector2 { constructo ...
最新文章
- ant安装过程,配置过程
- Fedora升级到4.3.4内核后virtualbox执行/sbin/rcvboxdrv setup报Bad argument setup
- 代替Excel上载的方法
- boost::graph_property_iter_range用法的测试程序
- leetcode 621. 任务调度器(贪心算法)
- 第10-11讲 后端
- 网络协议:TCP/IP协议,你看懂了吗?
- Servlet chapter 2
- MySQL 8.0.11 中使用 grant ... identified by 时 error 1064 near 'identified by '密码'' at line 1...
- DXP2004/Altium Desinger 自己画元器件和封装,及注意事项
- 技术人如何才能做好绩效管理提升团队绩效?
- 数三角(triangle)
- Anker-一个研发工程师的电商梦
- ecshop 评价仿京东仿淘宝 中评率 好评率 差评率
- 强网杯2022 pwn 赛题解析——yakacmp
- java 定义别名_Java 别名(Aliasing)
- 经常失眠怎么办?失眠最快入睡的方法
- 异形滚动轮播图---jquery实现
- dataframe按照某列排序
- city-picker插件使用-移动h5三级联动