-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
134 lines (89 loc) · 2.53 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<style>
@import url('https://fonts.googleapis.com/css2?family=Kanit:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap');
* {
margin: 0;
padding: 0;
font-family: "Lato", sans-serif;
}
main {
height: 100vh;
width: 100%;
background-color: #014179;
;
}
nav {
min-height: 70px;
width: 100%;
background-color: rgb(255, 255, 255);
}
.logo {
float: left;
padding: 20px;
/* font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; */
}
.left {
text-align: right;
}
span {
display: none;
}
ul li {
list-style: none;
display: inline-block;
padding: 25px 20px;
/* font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; */
}
@media only screen and (max-width:540px) {
span {
display: block;
text-align: right;
padding: 20px;
font-size: 22px;
cursor: pointer;
}
ul li {
display: block;
}
ul {
display: none;
}
.left{
text-align: left;
}
}
</style>
<main>
<nav>
<h1 class="logo">Java</h1>
<span onclick="foo()">☰</span>
<div class="left">
<ul id="list">
<li>Home</li>
<li>About</li>
<li>Services</li>
<li>Contact </li>
<li>Blog</li>
</ul>
</div>
</nav>
</main>
<script>
let list = document.getElementById('list');
function foo() {
if (list.style.display == 'none') {
list.style.display = 'block'
} else {
list.style.display = 'none'
}
}
</script>
</body>
</html>