-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfullNavig.html
More file actions
129 lines (126 loc) · 3.4 KB
/
fullNavig.html
File metadata and controls
129 lines (126 loc) · 3.4 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<!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" />
<title>Full screen Navigation</title>
<style>
* {
margin: 0;
padding: 0;
font-family: poppins;
}
h3 {
font-size: 3em;
}
.container {
padding: 5rem;
background-color: #ccc;
box-shadow: dimgrey 0px 10px 15px 0px;
}
.btn {
padding: 12px 14px;
margin: 12px;
border: none;
border-radius: 5px;
outline: none;
font-size: 15px;
background-color: crimson;
color: white;
transition: 0.3s;
}
.btn:hover {
cursor: pointer;
border: 1px solid crimson;
background: none;
color: crimson;
}
.overlay{
height: 100%;
width: 0;
position: fixed;
z-index: 1;
left: 0;
top: 0;
background-color: rgb(0,0,0);
background-color: rgb(0,0,0,0.9);
overflow-x: hidden;
transition: 0.5s;
}
.overlay-content{
position: relative;
top: 25%;
width: 100%;
text-align: center;
margin-top: 30px;
}
.overlay a{
padding: 8px;
text-decoration: none;
font-size: 36px;
color: white;
display: block;
transition: 0.3s;
}
.overlay a:hover, .overlay a:focus{
color: #2196f2;
}
.overlay .closebtn{
position: absolute;
top: 20px;
right: 45px;
font-size: 60px;
background: none;
border: none;
color: white;
outline: none;
cursor: pointer;
}
@media screen and (max-height: 450px){
.overlay a{font-size: 20px;}
.overlay .closebtn{
font-size: 40px;
top: 15px;
right: 35px;
}
}
</style>
</head>
<body>
<!-- The overlay -->
<div id="myNav" class="overlay">
<!-- Close button -->
<button href="javascript:void(0)" class="closebtn" onclick="closeNav()">
×
</button>
<!-- Overlay content -->
<div class="overlay-content">
<a href="#">About</a>
<a href="#">Services</a>
<a href="#">Clients</a>
<a href="#">Contact</a>
</div>
</div>
<div class="container">
<h3>Click on the buttons below to see how it works :</h3>
<button class="btn" onclick="openNavRight()">Slide Right</button
><button class="btn" onclick="openDown()">Slide Down</button
><button class="btn" onclick="show()">Show(No animation)</button>
</div>
<script>
function closeNav(){
document.getElementById("myNav").style.width= "0";
}
function openNavRight(){
document.getElementById("myNav").style.width= "100%";
}
function openDown(){
document.getElementById("myNav").style.height= "100%";
}
function show(){
document.getElementById("myNav").style.display= "block%";
}
</script>
</body>
</html>