Advertisement
Guest User

OurClans Nav Menu

a guest
Jan 17th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta name="viewport" content="width=device-width, initial-scale=1">
  5. <style>
  6. body {
  7. font-family: 'Lato', sans-serif;
  8. }
  9.  
  10. .overlay {
  11. height: 100%;
  12. width: 0;
  13. position: fixed;
  14. z-index: 1;
  15. top: 0;
  16. left: 0;
  17. background-color: rgb(0,0,0);
  18. background-color: rgba(0,0,0, 0.9);
  19. overflow-x: hidden;
  20. transition: 0.5s;
  21. }
  22.  
  23. .overlay-content {
  24. position: relative;
  25. top: 25%;
  26. width: 100%;
  27. text-align: center;
  28. margin-top: 30px;
  29. }
  30.  
  31. .overlay a {
  32. padding: 45px;
  33. text-decoration: none;
  34. font-size: 56px;
  35. color: #818181;
  36. display: block;
  37. transition: 0.3s;
  38. }
  39.  
  40. .overlay a:hover, .overlay a:focus {
  41. color: #f1f1f1;
  42. }
  43.  
  44. .overlay .closebtn {
  45. position: absolute;
  46. top: 20px;
  47. right: 45px;
  48. font-size: 60px;
  49. }
  50.  
  51. @media screen and (max-height: 450px) {
  52. .overlay a {font-size: 20px}
  53. .overlay .closebtn {
  54. font-size: 40px;
  55. top: 15px;
  56. right: 35px;
  57. }
  58. }
  59. </style>
  60. </head>
  61. <body>
  62.  
  63. <div id="myNav" class="overlay">
  64. <a href="javascript:void(0)" class="closebtn" onclick="closeNav()">&times;</a>
  65. <div class="overlay-content">
  66. <a href="#OurClans">Our Clans</a>
  67. <a href="#SpecialClans">Special Clans</a>
  68. <a href="#TheGangs">The Gangs</a>
  69. <a href="#Extras">Extras</a>
  70. </div>
  71. </div>
  72.  
  73.  
  74. <p style="text-align: center;"><span style="font-size:30px;cursor:pointer" onclick="openNav()">&#9776; Open Navigation Menu</span></p>
  75.  
  76. <script>
  77. function openNav() {
  78. document.getElementById("myNav").style.width = "100%";
  79. }
  80.  
  81. function closeNav() {
  82. document.getElementById("myNav").style.width = "0%";
  83. }
  84. </script>
  85.  
  86. </body>
  87. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement