JS简易弹球
作者:
郭钰涛 | 来源:发表于
2017-05-25 21:55 被阅读0次<!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简易弹球
本文链接:https://www.haomeiwen.com/subject/tkazxxtx.html
网友评论