<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">
* {
margin: 0;
padding: 0;
}
img {
display: inline-block;
}
.goods {
width: 50%;
text-align: center;
margin: 50px auto;
}
.goods img {
animation: myfirst 2s infinite;
}
@keyframes myfirst {
0% {
transform: translate(0px, 0px);
}
50% {
transform: translate(0px, -10px);
}
100% {
transform: translate(0px, 0px);
}
}
</style>
</head>
<body>
<div class="goods">
<img src="images/box1.png" />
</div>
</body>
</html>