负责代码看效果
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style>
.image1up {
position: absolute;
border-radius: 10px;
top: 8px;
left: 8px;
width: 100px;
height: 20px;
background: red;
animation: myfirst 3s infinite;
animation-iteration-count: infinite;
transition-timing-function: linear;
-moz-animation: myfirst 3s infinite;
/* Firefox */
-webkit-animation: myfirst 3s infinite;
/* Safari and Chrome */
-o-animation: myfirst 3s infinite;
/* Opera */
}
.image1bac {
border-radius: 10px;
width: 100px;
height: 20px;
background: brown;
}
@keyframes myfirst {
0% {
width: 20px;
}
100% {
width: 100px;
}
}
@-moz-keyframes myfirst
/* Firefox */
{
0% {
width: 20px;
}
100% {
width: 100px;
}
}
@-webkit-keyframes myfirst
/* Safari and Chrome */
{
0% {
width: 20px;
}
100% {
width: 100px;
}
}
@-o-keyframes myfirst
/* Opera */
{
0% {
width: 20px;
}
100% {
width: 100px;
}
}
</style>
</head>
<body>
<div class="image1up"></div>
<div class="image1bac"></div>
</body>
</html>