<!DOCTYPE html>
<html>
<head>
<style>
body {
display: flex;
justify-content: center;
}
.ball {
width: 100px;
height: 100px;
/* border-radius: 50%;
background-color: #FF5722; */
background: url(http://txcdn1-file-m.mvbox.cn/handup/e6af0923ce1e5192c746ed9dc5f26b82.png) no-repeat;
/* animation: bounce 0.5s;
animation-direction: alternate;
animation-timing-function: cubic-bezier(.5, 0.05, 1, .5);
animation-iteration-count: infinite; */
animation: bounce .5s linear infinite;
/* animation: bounce .5s cubic-bezier(.5, 0.05, 1, .5) infinite; */
}
@keyframes bounce {
/* from {
transform: translate3d(0, 0, 0);
}
to {
transform: translate3d(0, 200px, 0);
} */
0% {
transform: translateY(0) ;
}
25% {
transform: translateY(10px);
}
50% {
transform: translateY(20px) scale(1.1, 0.9);
}
75% {
ransform: translateY(10px) ;
}
100% {
transform: translateY(0) ;
}
}
/* Prefix Support */
/* ball {
-webkit-animation-name: bounce;
-webkit-animation-duration: 0.5s;
-webkit-animation-direction: alternate;
-webkit-animation-timing-function: cubic-bezier(
.5, 0.05, 1, .5);
-webkit-animation-iteration-count: infinite;
}
@-webkit-keyframes bounce {
from {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
to {
-webkit-transform: translate3d(0, 200px, 0);
transform: translate3d(0, 200px, 0);
}
} */
</style>
</head>
<body>
<div class="ball"></div>
</body>
</html>