html
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!-- Responsive -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<!-- jQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!-- JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<!--Navigation bar-->
<div class="navbar">
<span class="menu glyphicon glyphicon-menu-hamburger">
</span>
</div>
<!--Side Menu-->
<div class="side-menu">
<span class="close-side-menu glyphicon glyphicon-remove"></span>
</div>
</body>
</html>
Enter to Rename, Shift+Enter to Preview
css
css
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
body {
background-color: silver;
font-family: Ubuntu;
}
.navbar{
position: fixed;
height: 60px;
width: 100%;
background-color: salmon;
box-shadow: 4px 0 7px dimgray;
}
.menu{
position: relative;
margin-top: 12px;
margin-left: 10px;
font-size: 40px;
color: gainsboro;
user-select: none;
}
.side-menu{
position: fixed;
height: 100%;
width: 0;
background-color: darksalmon;
display: none;
color: white;
box-shadow: 0 2px 5px dimgray;
}
Enter to Rename, Shift+Enter to Preview
js
js
1
2
3
4
5
6
7
8
9
10
11
12
13
$(function(){
//open side menu
$('.menu').on('click', function(){
$('.side-menu').show();
$('.side-menu').animate({width: '170px'}, 500);
});
//close side menu
$('.close-side-menu').on('click', function(){
$('.side-menu').animate({width: '0px'}, 500);
$('.side-menu').show();
});
});
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run