forked from lingonsaft/hacktoberfest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle_game.html
63 lines (54 loc) · 1.52 KB
/
circle_game.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
62
63
<html>
<head>
<title>Circle_game</title>
<style type="text/css">
.circle{
width:100px;
height:100px;
border-radius:50%;
margin-right: 50px;
float: left;
}
#red-circle{
background-color:red;
}
#blue-circle{
background-color:blue;
}
#black-circle{
background-color:black;
}
#yellow-circle{
background-color:yellow;
}
#green-circle{
background-color:green;
}
</style>
</head>
<body align="center">
<h2 align="center"> Disappearing Circle Game</h2>
<div class="circle" id="red-circle" ></div>
<div class="circle" id="blue-circle"></div>
<div class="circle" id="green-circle"></div>
<div class="circle" id="black-circle"></div>
<div class="circle" id="yellow-circle"></div>
<script type="text/javascript">
document.getElementById("red-circle").onclick=function(){
document.getElementById("red-circle").style.display="none";
}
document.getElementById("blue-circle").onclick=function(){
document.getElementById("blue-circle").style.display="none";
}
document.getElementById("black-circle").onclick=function(){
document.getElementById("black-circle").style.display="none";
}
document.getElementById("yellow-circle").onclick=function(){
document.getElementById("yellow-circle").style.display="none";
}
document.getElementById("green-circle").onclick=function(){
document.getElementById("green-circle").style.display="none";
}
</script>
</body>
</html>