-
Notifications
You must be signed in to change notification settings - Fork 0
/
Mobile-nav.html
161 lines (149 loc) · 3.72 KB
/
Mobile-nav.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
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
<html lang="en">
<head>
<meta charset="UTF-8">
;; <title>Mobile-nav</title>
<style>
*{
box-sizing: border-box;
}
body{
display: flex;
height: 100vh;
margin: 0;
padding: 0;
background-color: white;
}
</style>
<style>
.phone {
width: 320px;
height: 260px;
margin: auto;
display: flex;
align-items: flex-end;
position: relative;
justify-content: center;
}
.phone::before {
content: '';
position: absolute;
width: 84%;
height: 0px;
bottom: -10px;
box-shadow: 0 0 25px 9px rgba(255, 0, 0, 0.33), 50px 10px 25px 8px rgba(18, 255, 0, 0.33), -40px 8px 25px 9px rgba(242, 255, 0, 0.33);
left: 0;
right: 0;
margin: auto;
}
.phone::after {
content: '';
}
.phone_content {
filter: contrast(20);
width: 100%;
background-color: white;
overflow: hidden;
position: absolute;
}
.phone_bottom {
width: 100%;
height: 66px;
background: black;
display: flex;
justify-content: center;
filter: blur(10px);
}
input {
display: none;
}
label {
cursor: pointer;
display: flex;
width: 33%;
height: 66px;
position: relative;
z-index: 2;
align-items: center;
justify-content: center;
}
label > img {
width: 25px;
top: 0;
bottom: 0;
margin: auto;
position: absolute;
z-index: 3;
transition: 200ms 100ms cubic-bezier(0.14, -0.08, 0.74, 1.4);
}
label::before {
content: '';
position: absolute;
}
.circle {
width: 60px;
height: 60px;
background: black;
position: absolute;
top: 152px;
z-index: 1;
border-radius: 50%;
left: 0;
right: 0;
margin: auto;
transition: 200ms cubic-bezier(0.14, -0.08, 0.74, 1.4);
box-shadow: 0px 82px 20px 0px rgba(128, 128, 128, 0.29);
}
.indicator {
width: 70px;
height: 70px;
background-image: linear-gradient(0deg, #f7b0b0, rgba(183, 255, 154, 0)), linear-gradient(0deg, rgba(158, 255, 151, 0.75), rgba(183, 255, 154, 0)), linear-gradient(0deg, #b4fffb, rgba(183, 255, 154, 0));
background-size: cover;
background-position: 0 10px;
border-radius: 50%;
position: absolute;
left: 0;
top: -42px;
right: 0;
margin: auto;
transition: 200ms cubic-bezier(0.14, -0.08, 0.74, 1.4);
}
#s1:checked ~ [for="s1"] > img {
top: -85px;
}
#s1:checked ~ .circle,
#s1:checked ~ div div .indicator {
left: -66%;
}
#s2:checked ~ [for="s2"] > img {
top: -85px;
}
#s2:checked ~ .circle,
#s2:checked ~ div div .indicator {
left: 0;
}
#s3:checked ~ [for="s3"] > img {
top: -85px;
}
#s3:checked ~ .circle,
#s3:checked ~ div div .indicator {
left: 66%;
}
</style>
</head>
<body translate="no">
<div class="phone">
<input type="radio" name="s" id="s1">
<input type="radio" name="s" id="s2" checked="checked">
<input type="radio" name="s" id="s3">
<label for="s1"><img src="https://co0kie.github.io/codepen/mobile-nav/facebook.svg" alt=""></label>
<label for="s2"><img src="https://co0kie.github.io/codepen/mobile-nav/twitter.svg" alt=""></label>
<label for="s3"><img src="https://co0kie.github.io/codepen/mobile-nav/instagram.svg" alt=""></label>
<div class="circle"></div>
<div class="phone_content">
<div class="phone_bottom">
<span class="indicator"></span>
</div>
</div>
</div>
</body>
</html>