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杯子里萤火虫发光动画特效相关推荐

  1. html 萤火虫特效,html5+CSS3杯子里萤火虫发光动画特效

    html5+CSS3杯子里萤火虫发光动画特效 js代码 var numP = 50; TweenMax.set("#content", {transformOrigin:" ...

  2. html 萤火虫特效,html5杯子里萤火虫发光动画特效

    js代码 var numP = 50; TweenMax.set("#content", {transformOrigin:"50% -45%"}) //Twe ...

  3. html 萤火虫特效,html5关在杯子里萤火虫动画特效

    特效描述:html5 萤火虫动画特效.html5关在杯子里跟随鼠标摇晃的萤火虫发光动画特效. 代码结构 1. 引入JS 2. HTML代码 var numP = 50; TweenMax.set(&q ...

  4. html 文字悬停翻转,html5+TweenMax.js鼠标悬停文字翻转动画特效

    8种动画效果十分流畅的html5+TweenMax.js鼠标悬停文字翻转动画特效,支持英文字母和中文汉字. 查看演示 下载资源: 14 次 下载资源 下载积分: 20 积分 js代码 const le ...

  5. html怎么设置点击播放音乐,html5点击播放音乐试听按钮动画特效

    特效描述:html5 点击播放 音乐试听 按钮动画特效.html5鼠标滑过或点击播放音乐试听特效 代码结构 1. 引入CSS 2. 引入JS 3. HTML代码 Examples eventType ...

  6. html5圆圈闪烁,html5 css3圆形波浪百分比加载动画特效

    一款简单漂亮的html5 css3圆形波浪百分比加载动画特效,非常好看的波浪滚动上升动画效果,也可用于百分比展示. 查看演示 下载资源: 28 次 下载资源 下载积分: 20 积分 js代码 var ...

  7. html5 canvas酷炫3D背景打开动画特效

    html5 canvas酷炫3D背景打开动画特效 点击跳转到演示地址 点击进入资源下载地址

  8. html5 特效 背景 腾讯,html5腾讯QQ登录界面背景动画特效

    特效描述:html5 腾讯QQ 登录界面 背景动画特效.腾讯QQ登陆界面动态背景,直接从腾讯网站获取,js代码有加密,做了个简单地示例 代码结构 1. 引入JS 2. HTML代码 *{margin: ...

  9. HTML粒子碰撞烟花,html5 canvas漂亮的粒子烟花背景动画特效

    特效描述:html5 canvas 漂亮的粒子烟花 背景动画特效.html5 canvas漂亮的粒子烟花背景动画特效 代码结构 1. HTML代码 class Vector2 { constructo ...

最新文章

  1. ant安装过程,配置过程
  2. Fedora升级到4.3.4内核后virtualbox执行/sbin/rcvboxdrv setup报Bad argument setup
  3. 代替Excel上载的方法
  4. boost::graph_property_iter_range用法的测试程序
  5. leetcode 621. 任务调度器(贪心算法)
  6. 第10-11讲 后端
  7. 网络协议:TCP/IP协议,你看懂了吗?
  8. Servlet chapter 2
  9. MySQL 8.0.11 中使用 grant ... identified by 时 error 1064 near 'identified by '密码'' at line 1...
  10. DXP2004/Altium Desinger 自己画元器件和封装,及注意事项
  11. 技术人如何才能做好绩效管理提升团队绩效?
  12. 数三角(triangle)
  13. Anker-一个研发工程师的电商梦
  14. ecshop 评价仿京东仿淘宝 中评率 好评率 差评率
  15. 强网杯2022 pwn 赛题解析——yakacmp
  16. java 定义别名_Java 别名(Aliasing)
  17. 经常失眠怎么办?失眠最快入睡的方法
  18. 异形滚动轮播图---jquery实现
  19. dataframe按照某列排序
  20. city-picker插件使用-移动h5三级联动

热门文章

  1. 移动硬盘linux逻辑分区的区别,主磁盘分区、扩展磁盘分区、逻辑分区的区别
  2. 黑马java课程2222
  3. MATLAB各种二维绘图函数
  4. mpg文件切片之后,不能播放问题分析
  5. 蒙特梭利时钟卡素材蒙氏素材三段卡素材
  6. 侠盗飞车4无法运行因计算机缺失,PC版《侠盗猎车手4》面临大量的问题
  7. 地震勘探基础(十四)之地震反演
  8. 《计算机操作系统》课程学习(1)——第1章 操作系统引论
  9. 美国风投公司年度盈利排名:NEA第一红杉第二
  10. php实现生成订单功能,订单提交、生成订单功能开发