版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u010881899/article/details/80666937
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<style type="text/css">
*{padding:0;margin:0;}
.ad{
width:50px;
height:50px;
position:fixed;
right:10px;
bottom:40px;
}
.ad .icon{
display: block;
content: "";
width: 50px;
height: 50px;
background: url() 0 0 no-repeat;
background-size: 50px 50px;
position: absolute;
-webkit-animation: move 2s linear infinite;
-webkit-transform-origin: 50% 70%;
}
.ad a img{
width:50px;
height:50px;
vertical-align:top;
}
@keyframes move{
10%,20%{
-webkit-transform: rotate(-8deg);
}
5%,15%,25%{
-webkit-transform: rotate(8deg);
}
0%,30%,100%{
-webkit-transform: rotate(0deg);
}
}
</style>
</head>
<body>
<div class="ad">
<a class="icon" href="##">
<img src="images/jd.gif" />
</a>
</div>
</body>
</html>
效果: