-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
161 lines (141 loc) · 3.02 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Css Nav</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
height: 100vh;
background: #D7DDE5;
font-family: "Roboto", sans-serif;
}
nav {
display: flex;
justify-content: space-between;
padding: 15px 5%;
align-items: center;
background: #18283B;
}
.logo {
color: #FFF;
font-size: 22px;
}
ul {
list-style: none;
}
ul li {
display: inline-block;
}
ul li a {
text-decoration: none;
color: #8291A5;
padding: 8px 30px;
border-radius: 7px;
transition: all .3s ease;
}
ul li a:hover,
ul li a.active {
color: #FFF;
background: #0075FF;
}
#icon {
background-color: #0075FF;
padding: 5px 7px 3px 7px;
border-radius: 4px;
cursor: pointer;
transition: all .3s ease;
}
#icon svg {
color: #FFF;
height: 28px;
transition: all .3s ease;
}
#icon:hover {
background: #FFF;
}
#icon:hover svg {
color: #0075FF;
}
#checkbox,
#icon {
display: none;
}
/* Youtube link */
.link {
position: fixed;
background-color: #D12322;
padding: 23px 40px;
right: -100px;
border-radius: 5px;
top: 50%;
transform: translateY(-50%);
transform: rotate(-90deg);
font-size: 18px;
font-weight: 500;
color: #FFF;
text-decoration: none;
text-transform: capitalize;
transition: all .1s ease-in-out;
}
.link i {
padding-left: 7px;
}
.link:hover {
text-decoration: underline;
background-color: black;
}
@media screen and (max-width: 768px) {
nav {
border-bottom: 1px solid #455468;
}
ul {
position: absolute;
width: 100%;
height: calc(100vh - 71px);
background-color: #18283B;
left: 0;
top: 0;
text-align: center;
display: none;
margin-top: 71px;
}
ul li {
display: block;
padding: 10px 15px;
}
ul li a {
display: block;
padding: 10px 0;
}
#icon {
display: block;
}
#checkbox:checked~ul {
display: block;
}
}
</style>
</head>
<body>
<nav>
<div class="logo">MR CODER</div>
<input type="checkbox" id="checkbox">
<label for="checkbox" id="icon">
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"></path></svg>
</label>
<ul>
<li><a href="#" class="active">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Project</a></li>
<li><a href="#">Blog</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
</body>
</html>