-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
61 lines (56 loc) · 1.5 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Responsive Side Menu</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<nav class="navbar">
<span class="open-slide">
<a href="#" onclick="openSlideMenu()">
<svg width="30" height="30">
<path d="M0,5 30,5" stroke="#fff"
stroke-width="5"/>
<path d="M0,14 30,14" stroke="#fff"
stroke-width="5"/>
<path d="M0,23 30,23" stroke="#fff"
stroke-width="5"/>
</svg>
</a>
</span>
<ul class="navbar-nav">
<li> <a href="#">Contact</a> </li>
<li> <a href="#">services</a> </li>
<li> <a href="#">About</a> </li>
<li> <a href="#">Home</a> </li>
</ul>
</nav>
<div id="side-menu" class="side-nav">
<a href="#" class="btn-close" onclick="closeSlideMenu()">×</a>
<a href="#">Home</a>
<a href="#">About</a>
<a href="#">Services</a>
<a href="#">Contact</a>
</div>
<div id="main">
<h1>Responsive Side Menu</h1>
</div>
</main>
<script >
function openSlideMenu(){
document.getElementById('side-menu').style.width =
'250px';
document.getElementById('main').style.marginLeft =
'250px';
}
function closeSlideMenu(){
document.getElementById('side-menu').style.width =
'0';
document.getElementById('main').style.marginLeft =
'0';
}
</script>
</body>
</html>