-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
51 lines (48 loc) · 2.03 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="style.css" />
<title>Gradient Background</title>
</head>
<body id="gradient">
<header>
<h1>Background Generator</h1>
</header>
<main>
<section>
<label for="color1">First color:</label>
<input type="color" name="color1" id="color1" value="#00ff00" />
<label for="color2">Second color:</label>
<input type="color" name="color2" id="color2" value="#ff0000" />
<select class="toDirection">
<option value="to right">to right</option>
<option value="to right bottom">to right bottom</option>
<option value="to right top">to right top</option>
<option value="to left">to left</option>
<option value="to left bottom">to left bottom</option>
<option value="to left top">to left top</option>
<option value="to bottom">to bottom</option>
<option value="to top">to top</option>
<option value="radial">radial</option>
</select>
<button class="randomDirection">Random direction</button>
</section>
<section>
<h2>Current CSS Background</h2>
<h3 class="gradientGenerate"></h3>
<button class="random">Random both colors</button>
<button class="firstRandomBtn">Random only first color</button>
<button class="secondRandomBtn">
Random only second color
</button>
</section>
</main>
<footer>
<p>Made with ❤</p>
</footer>
<script src="main.js"></script>
</body>
</html>