<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<style>
* {
margin:0;
padding:0;
}
#wrap {
background-color:#0094ff;
height:600px;
width:600px;
}
#round {
height:100px;
width:100px;
background-color:#452692;
border-radius:50%;
position:absolute;
}
</style>
<script src="tween.js"></script>
</head>
<body>
<div id="wrap">
<div id="round"></div>
</div>
<script>
var round = document.getElementById("round");
function r() {
var t = 0;
var b = 0;
var c = 500;
var d = 2000;
var timer = setInterval(run, 20)
function run() {
t += 10;
if (t >= d) {
clearInterval(timer);
myfunction();
}
round.style.left =Tween.Bounce.easeInOut(t, b, c, d) + "px"; }
}
function myfunction() {
var t = 0;
var b = 0;
var c = 500;
var d = 2000;
var timer1 = setInterval(we, 20)
function we() {
t += 10;
if (t>=d) {
clearInterval(timer1);
myfunc();
}
round.style.top =Tween.Bounce.easeInOut(t, b, c, d) + "px";
}
}
function myfunc() {
var t = 0;
var b = 0;
var c = 500;
var d = 2000;
var timer2 = setInterval(we, 20)
function we() {
t += 10;
if (t >= d) {
clearInterval(timer2);
myfun();
}
round.style.left =c-Tween.Bounce.easeInOut(t, b, c, d) + "px";
}
}
function myfun() {
var t = 0;
var b = 0;
var c = 500;
var d = 2000;
var timer3 = setInterval(we, 20)
function we() {
t += 10;
if (t >= d) {
clearInterval(timer3);
r();
}
round.style.top =c-Tween.Bounce.easeInOut(t, b, c, d) + "px";
}
}r();
</script>
</body>
</html>

最新文章

  1. 关于ORACLE隐式转换后性能问题
  2. C# String.Format
  3. Linux文件目录结构说明
  4. Demo学习: ClientInfo
  5. 一次失败的刷题经历:[LeetCode]292之尼姆游戏(Nim Game)(转)
  6. location的使用
  7. [ERROR] Fatal error: Can&#39;t open and lock privilege tables: Table &#39;mysql.user&#39; doesn&#39;t exist 160913 02:11:21 mysqld_safe mysqld from pid file /tmp/mysql.pid ended
  8. 第一章 开发简单Java应用程序
  9. C#之概述
  10. maven私服nexus清理释放磁盘空间
  11. Python开发【内置模块篇】os模块
  12. How to DUMP the vba code protected by Unviewable+ VBA?
  13. 10、jeecg 默认为空的字段值是如何被填充的?
  14. SpringMvc父子容器
  15. 自定义控件详解(三):Canvas效果变换
  16. WARN bzip2.Bzip2Factory: Failed to load/initialize native-bzip2 library system-native, will use pure-Java version
  17. 『Python』skimage图像处理_旋转图像
  18. SVM 的推导、特点、优缺点、多分类问题及应用
  19. 教你小三角,适用移动端等,解决移动端a标签的默认样式
  20. [洛谷P2057][SHOI2007]善意的投票

热门文章

  1. 【前端】CentOS 7 系列教程之二: 安装 git 最新版
  2. bzoj1222
  3. 父窗口与iFrame之间调用方法和元素
  4. PTA 朋友圈【并查集的合并问题】
  5. poj 1988 Cube Stacking【带权并查集】
  6. bzoj 1207: [HNOI2004]打鼹鼠【dp】
  7. 前端笔记之React(二)组件内部State&amp;React实战&amp;表单元素的受控
  8. 洛谷 P1339 [USACO09OCT]热浪Heat Wave
  9. Window下完全卸载删除Nodejs
  10. 洛谷 P2841 A*B Problem