<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>animation的具体应用详解</title>
<style>
.b{ background: url(icon_up.png) no-repeat 50% top; background-size:20px 10px; height:100px; width:580px; -webkit-animation: moveIconUp ease 1.5s both infinite;
animation: moveIconUp ease 1.5s both infinite;}
@-webkit-keyframes moveIconUp {
0% { -webkit-transform: translateY(100%); opacity:0;}
50% { -webkit-transform: translateY(50%); opacity:1;}
100% { -webkit-transform: translateY(0%); opacity:0;}
}
@keyframes moveIconUp {
0% { -webkit-transform: translateY(100%); transform: translateY(100%); opacity:0;}
50% { -webkit-transform: translateY(50%); transform: translateY(50%); opacity:1;}
100% { -webkit-transform: translateY(0%); transform: translateY(0%); opacity:0;}
}
}
</style>
</head>
<body>
<div style="background-color:#09F">
<div class="b"></div>
</div>
</body>
</html>
animation的具体应用详解
最新推荐文章于 2022-08-01 11:44:17 发布