-
Notifications
You must be signed in to change notification settings - Fork 1
/
css3无缝滚动.html
61 lines (57 loc) · 1.15 KB
/
css3无缝滚动.html
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
</head>
<style media="screen">
@keyframes scrollText1 {
0% {
transform: translateY(0px);
}
20% {
transform: translateY(-30px);
}
40% {
transform: translateY(-60px);
}
60% {
transform: translateY(-90px);
}
80% {
transform: translateY(-120px);
}
100% {
transform: translateY(-150px);
}
}
.box3 {
position: relative;
top: 20px;
left: 20px;
width: 200px;
height: 30px;
overflow: hidden;
border: 1px solid #ccc;
}
.border3 {
top: 0;
animation: scrollText1 8s infinite cubic-bezier(1,0,0.5,0);
}
.border3 div {
height: 30px;
}
</style>
<body>
<div class="box3">
<div class="border3">
<div>This is a test 1.</div>
<div>This is a test 2.</div>
<div>This is a test 3.</div>
<div>This is a test 4.</div>
<div>This is a test 5.</div>
<div>This is a test 6.</div>
</div>
</div>
</body>
</html>