<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div class="tank">
</div>
<script>
</script>
</body>
</html>
<style>
@-webkit-keyframes sigma{
100% {background-size:200px 200px;}
}
.tank{
border:1px solid #ccc;
width:100px;
height:100px;
overflow: hidden;
background:url("../Desktop/zj/coverImg.png") no-repeat;
background-size:100px 100px;
background-position:center center;
}
.tank:hover{
animation: sigma 5s;
}
</style>
废话不说,直接上代码