一个动画小demo程序
进度条动画
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
.box{
width: 800px;
height: 100px;
margin: 50px auto;
border-radius: 20px;
background-image: linear-gradient(
135deg,
black 25%,
white 25%,
white 50%,
black 50%,
black 75%,
white 75%
);
background-size: 100px 100px;
animation:move 1s linear infinite ;
}
@keyframes move {
from{
background-position: 0px;
}
to{
background-position: 100px ;
}
}
</style>
</head>
<body>
<div class="box">
</div>
</body>
</html>