/
demo.html
40 lines (37 loc) · 1001 Bytes
/
demo.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
<!DOCTYPE html>
<html>
<head>
<script src="index.js"></script>
<style type="text/css">
html, body {
min-height: 100%;
height: 100%;
}
button {
padding: 5px;
border-radius: 3px;
background-color: #ccc;
min-width: 300px;
}
#testbox {
position: fixed;
right: 0;
bottom: 0;
width: 400px;
height: 400px;
background-color: #ffcc00;
z-index: -1;
}
</style>
</head>
<body>
<button onclick="flash()">Flash default (body, 800ms)</button>
<br/>
<button onclick="flash({duration: 2000})">Flash long (body, 2s)</button>
<br/>
<button onclick="flash({colorFlash: '#00ff00'})">Flash green (body, 800ms)</button>
<br/>
<button onclick="flash({element: document.getElementById('testbox'), duration: 1000, colorFlash: '#ff0000'})">Flash box (red, 1s)</button>
<div id="testbox"></div>
</body>
</html>