css3动画_@keyframes奔跑的白熊
发布时间
阅读量:
阅读量


<!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>
<link rel="stylesheet" href="index.css">
<link rel="stylesheet" href="Test.css">
</head>
<style>
.box {
position: relative;
margin: 100px auto;
width: 1000px;
height: 500px;
background-color: red;
}
.divbox {
position: absolute;
width: 200px;
height: 100px;
background-color: pink;
background: url(images/xiogn.png) no-repeat;
animation: move 2s steps(8) infinite, serbs 2s forwards;
}
@keyframes move {
0% {
background-position: 0 0;
}
100% {
background-position: -1600px 0;
}
}
@keyframes serbs {
0% {
left: 0;
}
100% {
left: 50%;
transform: translateX(-50%);
}
}
</style>
<body>
<div class="box">
<div class="divbox"></div>
</div>
</body>
</html>
全部评论 (0)
还没有任何评论哟~
