-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.css
119 lines (119 loc) · 2.02 KB
/
header.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
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body{
height: 3000px;
}
nav {
position: fixed;
display: flex;
justify-content: space-evenly;
align-items: center;
width:100%;
height: 10%;
background: #fff;
border-radius: 0 0 20px 20px;
border:1px solid rgba(0, 0, 0, 0.2);
border-top: none;
box-shadow: 0 25px 10px -25px rgba(0, 0, 0, 0.4);
}
nav>ul{
display: flex;
justify-content: space-evenly;
align-items: center;
flex-basis: 60%;
}
nav #menu-button{
display: none;
}
nav .menu-button{
display: none;
}
nav>ul>li {
width: 20%;
list-style: none;
padding: 10px;
font-size: 20px;
font-weight: 500;
color: #777;
cursor: pointer;
position: relative;
z-index: 2;
transition: color 0.5s;
text-align: center;
}
nav>ul>li::after {
content: '';
background: #FF8066;
width: 10%;
height: 10%;
border-radius: 20px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: -1;
opacity: 0;
transition: all 0.4s ease-out;
}
nav>ul>li:hover{
color: #fff;
}
nav>ul>li:hover::after{
width: 70%;
height: 100%;
opacity: 1;
}
@media screen and (max-width:768px){
nav {
position: fixed;
display: inline-block;
}
nav .menu-button{
display: inline-block;
position: absolute;
top: 50%;
left: 50%;
cursor: pointer;
transform: translate(-50%,-50%);
}
nav>ul{
display: flex;
position: absolute;
top: -300%;
left: 50%;
transform: translateX(-50%);
flex-direction: column;
border-radius: 0 0 5px 5px;
border:1px solid rgba(0, 0, 0, 0.2);
border-top: none;
opacity: 0;
transition: all 0.4s ease-out;
}
nav>ul>li {
width: 100%;
}
nav>ul>li:hover::after{
width: 100%;
height: 80%;
opacity: 1;
}
nav>div{
display: inline-block;
position: absolute;
top: 50%;
transform: translateY(-50%);
}
nav #logo{
left: 20px;
}
nav #nav-user-link{
right: 20px;
}
nav #menu-button:checked ~ #nav-menu{
top: 100%;
opacity: 1;
}
}