-
Notifications
You must be signed in to change notification settings - Fork 2
/
homepage.html
51 lines (48 loc) · 1.58 KB
/
homepage.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
href="https://cdn.jsdelivr.net/npm/[email protected]/fonts/remixicon.css"
rel="stylesheet"
/>
<link rel="stylesheet" href="style3.css" />
<title>Web Design Mastery | Responsive Navigation Bar</title>
</head>
<body class="">
<header>
<nav>
<div class="nav__logo"><a href="#">
<img src="law2.png" alt="">
</a></div>
<ul class="nav__links">
<li class="link">Home</li>
<li class="link">About</li>
<li class="link"><a href="chatt.php">Service</a></li>
<li class="link">Blog</li>
<li class="link">Contact</li>
</ul>
<div class="toggle__btn">
<i class="ri-menu-line"></i>
</div>
</nav>
<div class="hero">
<h2>UNLOCKING LEGAL </h2>
<h1>SOLUTIONS</h1>
<button>Explore Now</button>
</div>
</header>
<script>
const toggleBtn = document.querySelector(".toggle__btn");
const toggleBtnIcon = document.querySelector(".toggle__btn i");
const menu = document.querySelector(".nav__links");
toggleBtn.onclick = function () {
menu.classList.toggle("open");
const isOpen = menu.classList.contains("open");
toggleBtnIcon.classList = isOpen ? "ri-close-line" : "ri-menu-line";
};
</script>
</body>
</html>