-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path1.css
127 lines (127 loc) · 2.57 KB
/
1.css
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
@import url("https://fonts.googleapis.com/css?family=Poppins:100,200,300,400,500,600,700,800,900");
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Poppins", sans-serif;
}
:root {
--clr: #060606;
}
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: var(--clr);
}
.navigation {
width: 400px;
height: 70px;
background: #fff;
position: relative;
display: flex;
justify-content: center;
align-items: center;
border-radius: 10px;
}
.navigation ul {
display: flex;
width: 350px;
}
.navigation ul li {
position: relative;
list-style: none;
width: 70px;
height: 70px;
z-index: 1;
}
.navigation ul li a {
position: relative;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
width: 100%;
text-align: center;
font-weight: 500;
}
.navigation ul li a .icon {
position: relative;
display: block;
line-height: 75px;
font-size: 1.5rem;
text-align: center;
transition: 0.5s;
color: var(--clr);
}
.navigation ul li.active a .icon {
transform: translateY(-33px);
}
.navigation ul li a .text {
position: absolute;
color: var(--clr);
font-weight: 400;
font-size: 0.75em;
letter-spacing: 0.05rem;
transition: 0.5s;
opacity: 0;
}
.navigation ul li.active a .text {
opacity: 1;
transform: translateY(10px);
}
.indicator {
position: absolute;
top: -30px;
width: 70px;
height: 60px;
background: #19c7f2;
border-radius: 50%;
border: 6px solid var(--clr);
transition: 0.5s;
}
.indicator::before {
content: "";
position: absolute;
top: 50%;
left: -24px;
width: 25px;
height: 25px;
background: transparent;
border-top-right-radius: 20px;
box-shadow: 0.5px -10px var(--clr);
}
.indicator::after {
content: "";
position: absolute;
top: 50%;
right: -24px;
width: 25px;
height: 25px;
background: transparent;
border-top-left-radius: 20px;
box-shadow: -0.5px -10px 0 0 var(--clr);
}
.navigation ul li:nth-child(1).active ~ .indicator {
transform: translateX(calc(70px * 0));
}
.navigation ul li:nth-child(2).active ~ .indicator {
transform: translateX(calc(70px * 1));
}
.navigation ul li:nth-child(3).active ~ .indicator {
transform: translateX(calc(70px * 2));
}
.navigation ul li:nth-child(4).active ~ .indicator {
transform: translateX(calc(70px * 3));
}
.navigation ul li:nth-child(5).active ~ .indicator {
transform: translateX(calc(70px * 4));
}
/* .navigation ul li:hover a .icon {
transform: translateY(-33px);
}
.navigation ul li:hover a .text {
opacity: 1;
transform: translateY(10px);
} */