Advertisement
Guest User

Untitled

a guest
Jul 24th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. <html>
  2. <head>
  3. <meta name="viewport" content="width=device-width, initial-scale=1">
  4. <!--<link rel="stylesheet" href="C:UsersHPDesktophtmlNew foldercssfontawesome.min.css">-->
  5. <style>
  6. body {
  7. font-family: Arial, Helvetica, sans-serif;
  8. }
  9.  
  10. .mobile-container {
  11. max-width: 480px;
  12. margin: auto;
  13. background-color: #555;
  14. height: 500px;
  15. color: white;
  16. border-radius: 10px;
  17. }
  18.  
  19. .topnav {
  20. overflow: hidden;
  21. background-color: #333;
  22. position: relative;
  23. }
  24.  
  25. .topnav #myLinks {
  26. display: none;
  27. }
  28.  
  29. .topnav a {
  30. color: white;
  31. padding: 14px 16px;
  32. text-decoration: none;
  33. font-size: 17px;
  34. display: block;
  35. }
  36.  
  37. .topnav a.icon {
  38. background: black;
  39. display: block;
  40. position: absolute;
  41. right: 0;
  42. top: 0;
  43. }
  44.  
  45. .topnav a:hover {
  46. background-color: #ddd;
  47. color: black;
  48. }
  49.  
  50. .active {
  51. background-color: #4CAF50;
  52. color: white;
  53. }
  54. </style>
  55. </head>
  56. <body>
  57.  
  58. <!-- Simulate a smartphone / tablet -->
  59. <div class="mobile-container">
  60.  
  61. <!-- Top Navigation Menu -->
  62. <div class="topnav">
  63. <a href="#home" class="active">Logo</a>
  64. <div id="myLinks">
  65. <a href="#news">News</a>
  66. <a href="#contact">Contact</a>
  67. <a href="#about">About</a>
  68. </div>
  69. <a href="javascript:void(0);" class="icon" onclick="myFunction()">
  70. <i class="fa fa-bars"></i>
  71. </a>
  72. </div>
  73.  
  74. <div style="padding-left:16px">
  75. <h3>hamburger</h3>
  76. <p>example navigation menu on a mobile phone view</p>
  77. </div>
  78.  
  79. </div>
  80.  
  81. <script>
  82. <!-- JS for default hide/navigate-->
  83. function myFunction() {
  84. var x = document.getElementById("myLinks");
  85. if (x.style.display === "block") {
  86. x.style.display = "none";
  87. } else {
  88. x.style.display = "block";
  89. }
  90. }
  91. </script>
  92.  
  93. </body>
  94. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement