forked from AnnatarHe/AnnatarHe.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
color-picker.html
118 lines (114 loc) · 3.4 KB
/
color-picker.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Color picker refs</title>
<style>
body {
font-family: 'Hack', 'Monaco';
}
* {
margin: 0;
}
.title {
display: flex;
align-items: center;
justify-content: center;
background-color: #888;
color: #fff;
padding: 3rem 0;
border-radius: .5rem;
}
.title h2 {
font-size: 2rem;
}
.container {
flex-wrap: wrap;
width: 80%;
margin: 0 auto;
}
.colors {
margin-top: 3rem;
display: flex;
align-items: center;
justify-content: center;
flex-direction: row;
flex-wrap: wrap;
}
.color-item {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 10rem;
padding: 0 3rem;
}
.color {
height: 8rem;
width: 8rem;
border-radius: .5rem;
}
.desc {
padding: 1rem;
color: #888;
}
@media screen and (max-width: 768px) {
.container {
width: 100%;
}
}
::selection {
background-color: #e3e3e3;
}
</style>
</head>
<body>
<section class="title">
<h2>Color picker refs</h2>
</section>
<section class="container">
<div class="colors">
<div class="color-item">
<div class="color" style="background-color: #888"></div>
<span class="desc">#888</span>
</div>
<div class="color-item">
<div class="color" style="background-color: #333"></div>
<span class="desc">#333</span>
</div>
<div class="color-item">
<div class="color" style="background-color: #d1d1d1"></div>
<span class="desc">#d1d1d1</span>
</div>
<div class="color-item">
<div class="color" style="background-color: #e3e3e3"></div>
<span class="desc">#e3e3e3</span>
</div>
<div class="color-item">
<div class="color" style="background-color: #666"></div>
<span class="desc">#666</span>
</div>
<div class="color-item">
<div class="color" style="background-color: teal"></div>
<span class="desc">teal</span>
</div>
<div class="color-item">
<div class="color" style="background-color: deeppink"></div>
<span class="desc">deeppink</span>
</div>
<div class="color-item">
<div class="color" style="background-color: #d1d1d1"></div>
<span class="desc">#d1d1d1</span>
</div>
<div class="color-item">
<div class="color" style="background-color: #d1d1d1"></div>
<span class="desc">#d1d1d1</span>
</div>
<div class="color-item">
<div class="color" style="background-color: #d1d1d1"></div>
<span class="desc">#d1d1d1</span>
</div>
</div>
</section>
</body>
</html>