-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpage.html
35 lines (31 loc) · 1.05 KB
/
webpage.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Page Title</title>
<link rel="stylesheet" type="text/css" media="" href="webpagecss.css" />
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
<script src="main.js"></script>
</head>
<body>
<div class="navbar">
<a href="#" id="hamburger" class="toggle">
<i class="fas fa-bars"></i>
</a>
<a href="#" class="brand">My branding</a>
<div class="left_links">
<a href="#" class="link">di yi ge</a>
<a href="#" class="link">di er ge</a>
</div>
<div class="right_links">
<a href="#" class="link">di san ge</a>
</div>
</div>
</body>
<script>
const hamburger = document.querySelector('#hamburger');
hamburger.addEventListener('click', (e) => {
hamburger.parentElement.classList.toggle('active');
})
</script>
</html>