<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
.ba1{
margin:100px auto;
width: 100px;
height: 300px;
/*border:1px solid red;*/
position: relative;
}
.ba2{
width: 100px;
height: 100px;
border-radius:50%;
border:1px solid black;
position: absolute;
background-color: red;
animation:move 2s infinite linear;
}
@keyframes move{
0%{
top:0;
animation-timing-function: ease-in;
}
50%{
height: 100px;
top:140px;
animation-timing-function: ease-out;
}
55%{
top:160px;
height: 80px;
border-radius: 50px/40px;
animation-timing-function: ease-in;
}
65%{
top:120px;
height: 100px;
border-radius: 50px;
animation-timing-function: ease-out;
}
100%{
top:0;
}
}
</style>
</head>
<body>
<div class="ba1">
<div class="ba2"></div>
</div>
</body>
</html>
JS简易弹球
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
推荐阅读更多精彩内容
- 本教程以windows作为开发环境,ios和linux可以作为参考。另外不会长篇大论(只是入门,只是入门),每个章...
- 新建一个hello.js,写入console.log("hello world") 保存文件 启动cmd,找到当前...
- 闲着无事写了一个简单的时钟效果,给新学css3的朋友做个参考吧。一、布局布局很简单,就是一个表盘加上时、分、秒三个...