-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhelp.html
More file actions
142 lines (135 loc) · 5.67 KB
/
help.html
File metadata and controls
142 lines (135 loc) · 5.67 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<article title="trip">
<p>
数字动画
<span id="trip"></span>
</p>
</article>
<article title="texts">
<p>
文本切换
<span id="texts"></span>
</p>
<p>
样式类切换
<span id="stycs">文本</span>
<style>
.red {
color: red;
background-color: black;
}
.green {
color: green;
background-color: black;
}
.blue {
color: blue;
background-color: black;
}
</style>
</p>
</article>
<article title="visible">
<p>
隐藏/显示
</p>
<div style="width:300px;height:50px;">
<div id="test1" style="background-color:gray;">
TEST1
</div>
<div id="test2" style="background-color:gray;">
TEST2
</div>
</div>
</article>
<article title="scroll">
<p>滚动</p>
<div id="scroll" style="width:300px;height:300px;overflow:auto;background-color:black;">
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">01</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">02</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">03</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">04</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">05</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">06</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">07</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">08</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">09</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">20</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">21</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">22</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">23</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">24</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">25</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">26</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">27</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">28</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">29</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">30</div>
</div>
</article>
<article title="toggle">
<p>
切换
</p>
<div id="toggle" style="width:300px;height:300px;overflow:auto;background-color:black;">
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">01</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">02</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">03</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">04</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">05</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">06</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">07</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">08</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">09</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">20</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">21</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">22</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">23</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">24</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">25</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">26</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">27</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">28</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">29</div>
<div style="background-color: rgba(255, 255, 255, 0.5);padding:10px;margin:1px;">30</div>
</div>
</article>
</body>
<script type="module">
import animate from './index.js';
// trip
setInterval(function() {
const span = document.getElementById("trip");
const value = Math.floor(Math.random() * 1000) + 1;
animate.trip(span, value);
}, 3000);
// texts
animate.texts("texts", ["J", "O", "Y", "Z", "L"]);
animate.classes("stycs", ["red", "green", "blue"]);
// visible
let visible = true;
setInterval(function() {
if (visible) {
visible = false;
animate.hide("test1", true, false);
animate.hide("test2", false, true);
} else {
visible = true;
animate.show("test1", true, false);
animate.show("test2", false, true);
}
}, 2000);
// scroll
animate.scroll("scroll");
animate.scroll("scroll");
// toggle
animate.toggle("toggle", 3);
// animate.toggle("toggle", 0);
</script>
</html>