我想从左到右移动一个带有图像的球,然后再回来。当它移动时,它必须弹跳并移动。我不能让这发生。有什么建议么?
HTML
<body>
<img src= "F:\New folder\1.jpg" />
<img src="F:\New folder\2.jpg" />
<img src="F:\New folder\3.jpg" />
<img src="F:\New folder\4.jpg"/>
</body>
CSS
img
{
width:30px;
height:30px;
border-style:solid;
border-width:3px;
border-radius:50%;
animation: spin 3s infinite linear alternate , bounce 2s 1 forward , movement 5s 3s 1 ;
}
@-webkit-keyframes bounce {
0% {
top: 0;
-webkit-animation-timing-function: ease-in;
}
16% {
top: 190px;
-webkit-animation-timing-function: ease-out;
}
32% {
top: 50px;
-webkit-animation-timing-function: ease-in;
}
48% {
top: 190px;
-webkit-animation-timing-function: ease-out;
}
62% {
top: 100px;
-webkit-animation-timing-function: ease-in;
}
78% {
top: 190px;
-webkit-animation-timing-function: ease-out;
}
90% {
top: 150px;
-webkit-animation-timing-function: ease-in;
}
100% {
top: 190px;
-webkit-animation-timing-function: ease-out;
}
}
@-webkit-keyframes spin {
0% { -webkit-transform: rotate(0deg); }
100% { -webkit-transform: rotate(360deg); }
}
@-webkit-keyframes movement {
0% {
top: 0%;
left: 0%;
}
33% {
top: 0%;
left: 25%;
}
66% {
top: 0;
left: 50%;
}
100% {
top: 0%;
left: 100%;
}
}