-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
101 lines (89 loc) · 2.79 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
99
100
101
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<script src="lib/p5.js"></script>
<script src="sketch.js"></script>
<script src="js/HyperCube.js"></script>
<title>Hyper Cube</title>
<style>
body {
margin: 0;
padding: 0;
}
span {
position: relative;
bottom: 2px;
text-align: center;
font-family:'Times New Roman', Times, serif;
font-weight: bold;
font-size: large;
color: #000;
}
#canvas-container {
width: 100vw;
height: 100vh;
background: radial-gradient(circle, #d7dde8, #757f9a);
}
.slider-container {
margin: 0px;
padding: 0px 30px 0px 0px;
width: 250px;
height: 200px;
position: absolute;
top: 5%;
right: 5%;
display: flex;
justify-content: center;
flex-direction: column;
align-items: end;
gap: 15px;
background: rgba(255, 255, 255, 0.3);
border-radius: 5px;
box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.3);
}
.slider-container:hover {
background: rgba(255, 255, 255, 0.5);
}
input[type="range"] {
width: 150px;
height: 20px;
appearance: none;
background: #ddd;
border-radius: 20px;
overflow: hidden;
cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb{
width: 20px;
height: 20px;
appearance: none;
background: #fff;
border: 2px solid #000;
border-radius: 10px;
box-shadow: -160px 0 0 150px #757f9a;
}
</style>
</head>
<body>
<div id="canvas-container"> </div>
<div class="slider-container">
<div class="slider-group">
<span>速度</span>
<input type="range" class="range" min="0" max="10" value="1" step="0.1" id="velocitySlider">
</div>
<div class="slider-group">
<span>色相</span>
<input type="range" class="range" min="0" max="360" value="0" step="1" id="hueSlider">
</div>
<div class="slider-group">
<span>饱和度</span>
<input type="range" class="range" min="0" max="100" value="0" step="1" id="saturationSlider">
</div>
<div class="slider-group">
<span>亮度</span>
<input type="range" class="range" min="0" max="100" value="0" step="1" id="brightnessSlider">
</div>
</div>
</body>
</html>