-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSidebar_Button.html
More file actions
65 lines (59 loc) · 1.13 KB
/
Copy pathSidebar_Button.html
File metadata and controls
65 lines (59 loc) · 1.13 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Sidebar</title>
</head>
<style>
.btn {
display: inline-block;
font-size: 2em;
padding: 0.75em 1em;
background-color: #1ce;
color: #fff;
text-transform: uppercase;
text-decoration: none;
}
.sidebar {
position: fixed;
top: 0;
bottom: 0;
right: 0;
width: 300px;
background-color: #333;
transition: transform 0.3s ease-out;
}
.sidebar.is-hidden {
transform: translateX(300px);
}
.sidebar ul {
margin: 0;
padding: 0;
}
.sidebar li {
list-style: none;
}
.sidebar li + li {
border-top: 1px solid white;
}
.sidebar a {
display: block;
padding: 1em 1.5em;
color: #fff;
text-decoration: none;
}
</style>
<body>
<a href="#" class="btn">Click me!</a>
<div class="sidebar is-hidden">
<ul>
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a></li>
<li><a href="#">Link 3</a></li>
<li><a href="#">Link 4</a></li>
<li><a href="#">Link 5</a></li>
</ul>
</div>
</body>
<script src="Sidebar_Button.js"></script>
</html>