-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmagic.html
More file actions
110 lines (83 loc) · 1.58 KB
/
magic.html
File metadata and controls
110 lines (83 loc) · 1.58 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
<html>
<head>
<title>David Song</title>
</head>
<body>
<style>
body {
padding: 0px;
margin: 0px;
width: 100%;
}
.body-wrapper {
width: 60%;
margin: 0 auto;
}
.logo {
position: relative;
float: left;
height:100%;
background-color: rgb(25, 25, 255);
}
#logo {
font-family: Helvetica;
font-style: italic;
font-size: 30px;
padding: 10px;
color: white;
}
#this_div {
background-color: red;
width: 200px;
height: 200px;
}
.buttons {
background-color: white;
width: 100px;
height: 50px;
position: relative;
float: left;
}
.banner {
top:0px;
height: 40px;
width: 100%;
background-color: rgb(100, 100, 255);
position: fixed;
}
</style>
<script src="scripts/color-wheel.js"></script>
<script src="scripts/lorem-ipsum.js"></script>
<script>
var intervalID;
var intervalTime = 50;
var running = false;
function changeColor () {
document.getElementById("this_div").style.backgroundColor = increment();
}
function start () {
if (running) return;
intervalID = setInterval(changeColor, intervalTime);
running = true;
}
function stop () {
clearInterval(intervalID);
running = false;
}
window.onload = function () {
fillLoremIpsum(document.getElementById('lorem-ipsum'));
}
</script>
<div class="body-wrapper">
<div class="banner" >
<div class="logo"><span id="logo">After School</span></div>
</div>
<h1>Want to see Magic?</h1>
<div id="this_div"></div>
<br />
<a href="javascript:start()" class="buttons" ><span><em>Magic</em></span></a>
<a href="javascript:stop()" class="buttons" ><span><em>Stop </em></span></a>
<div id="lorem-ipsum"></div>
</div>
</body>
</html>