-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathday32.html
More file actions
175 lines (149 loc) · 3.29 KB
/
day32.html
File metadata and controls
175 lines (149 loc) · 3.29 KB
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DAY 32 | CSS CHALLENGE</title>
<style>
@import url(https://fonts.googleapis.com/css?family=Open+Sans:600);
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
main {
display: grid;
place-items: center;
min-height: 100vh;
}
.frame {
position: relative;
width: 400px;
height: 400px;
border-radius: 1rem;
box-shadow: 1px 2px 10px 0px rgba(0, 0, 0, 0.2);
background: #57D895;
color: #fff;
font-family: "Open Sans", Helvetica, sans-serif;
display: flex;
align-items: center;
justify-content: center;
}
.hidden {
display: none;
}
.button {
display: inline-flex;
justify-content: center;
align-items: center;
width: 260px;
height: 60px;
border: 2px solid #fff;
border-radius: 5rem;
font-size: 1.5rem;
text-transform: uppercase;
font-weight: 600;
letter-spacing: 2px;
transition: all 0.3s ease-in-out;
cursor: pointer;
}
.button:hover {
background: #37BE77;
}
.check {
position: absolute;
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
opacity: 0;
}
.circle {
position: absolute;
width: 60px;
height: 60px;
z-index: 2;
top: 170px;
left: 170px;
fill: none;
stroke: #fff;
stroke-width: 2px;
stroke-linecap: round;
stroke-dasharray: 183 183;
stroke-dashoffset: 183;
pointer-events: none;
transform: rotate(-90deg);
}
input:checked~.button {
animation: button 0.5s ease both, fill 0.5s ease-out 1.5s forwards;
}
input:checked~.check {
animation: check 0.5s ease-out 1.5s both;
}
input:checked~.circle {
animation: circle 2s ease-out 0.5s both;
}
@keyframes button {
0% {
width: 260px;
border-color: #fff;
color: #fff;
}
50% {
color: transparent;
}
100% {
width: 60px;
border-color: #45B078;
background: transparent;
color: transparent;
}
}
@keyframes circle {
0% {
stroke-dashoffset: 183;
}
50% {
stroke-dashoffset: 0;
stroke-dasharray: 183;
transform: rotate(-90deg) scale(1);
opacity: 1;
}
90%,
100% {
stroke-dasharray: 500 500;
transform: rotate(-90deg) scale(2);
opacity: 0;
}
}
@keyframes fill {
0% {
background: transparent;
border-color: #fff;
}
100% {
background: #fff;
}
}
@keyframes check {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
</style>
</head>
<body>
<main>
<div class="frame">
<input type="checkbox" id="button" class="hidden" aria-hidden="true" />
<label for="button" class="button">Finish</label>
<img src="./img/checkmark-green.svg" alt="" aria-hidden="true" class="check" />
<svg class="circle">
<circle cx="30" cy="30" r="29" />
</svg>
</div>
</main>
</body>
</html>