本文共 713 字,大约阅读时间需要 2 分钟。
<!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>
<style>
.a{
width: 300px;
height: 300px;
animation: run;
animation-direction: 3s;
}
body{
background-color: #ffe3e1;
}
.a1 img{
width: 300px;
height: 300px;
}
.a1{
position: absolute;
}
@keyframes run{
0%{
transform: translateX(0PX);
}
50%{
transform: translateX(1000px);
}
51%{
transform: translateX(1000px) rotateY(180px);
}
100%{
transform: translateX(0px) rotateY(180px);
}
}
</style>
</head>
<body>
<div class="a">
<div class="a1">
<img src="./imges/car.jpg" alt="">
</div>
</div>
</body>
</html>
转载地址:http://rweuuy.baihongyu.com/