<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<style>
div {
width: 200px;
height: 200px;
background-color: orange;
animation: x 1s infinite alternate;
}
@keyframes x {
from{margin-left: 0px;}
to{margin-left: 600px;};
}
</style>
<body>
<div></div>
</body>
</html>
2021-10-02动画效果
最新推荐文章于 2024-07-03 21:45:00 发布