-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
98 lines (86 loc) · 2.35 KB
/
index.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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Background Color Changer</title>
<style>
.colorChanger{
padding: 10px;
font-size: 20px;
font-weight: 600;
border: 1px solid black;
outline: none;
border-radius: 50px;
}
.colorChanger:hover{
background-color: rgba(202, 225,200, 1);
}
.colorChanger:active{
animation: runbg 2s infinite forwards ;
border: none;
transform: translateX(0);
}
@keyframes runbg{
0%{
background-color: yellow;
color: lightcoral;
}
25%{
background-color: lightcoral;
color: lightskyblue;
}
50%{
background-color: lightskyblue;
color: maroon;
}
75%{
background-color: maroon;
color: midnightblue;
}
100%{
background-color: midnightblue;
color: yellow;
}
}
h4{
top: 10px;
width: 325px;
height: 30px;
padding: 10px 10px;
border: 1px solid black;
text-align: left;
position: absolute;
top:150px;
left: 40%;
margin: auto;
font-size: 30px;
background-color: white;
}
.rbgColor{
padding: 10px;
font-size: 16px;
font-weight: 800;
border-radius: 20px;
outline: none;
}
div{
position: absolute;
top:40%;
left:25%;
display:flex;
width: 800px;
flex-direction: row;
justify-content: space-around;
}
</style>
</head>
<body>
<h4 class="rgbcolor">RGB Color: <span class="inputrgb"></span></h4>
<div>
<button class="rbgColor" onclick="changeToRbg()">RGB COLOR</button>
<button class ="colorChanger" onclick="colorChange()">Change the Normal Color</button>
</div>
</body>
<script src="./script.js"></script>
</html>