Advertisement
Guest User

Untitled

a guest
Dec 11th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.73 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  7. <title>Javascript 1</title>
  8.  
  9. <style>
  10. span{
  11. display: none;
  12. color: red;
  13. }
  14.  
  15. input[type=number]::-webkit-inner-spin-button,
  16. input[type=number]::-webkit-outer-spin-button{
  17. -webkit-appearance: none;
  18. appearance: none;
  19. margin: 0;
  20. }
  21.  
  22. input[type=number]{
  23. -moz-appearance: textfield;
  24. }
  25.  
  26.  
  27. #menu{
  28. background-color: rgba(0,0, 0, 0.7);
  29. color: white;
  30. width: 0%;
  31. position: fixed;
  32. text-align: center;
  33. height: 100vh;
  34. display: flex;
  35. justify-content: center;
  36. align-items: center;
  37. z-index: 999;
  38. left: 0;
  39. top: 0;
  40. transition: 0.5s;
  41. }
  42.  
  43. #menu ul{
  44. flex-direction: column;
  45. list-style: none;
  46. visibility: hidden;
  47. transition: 0.5s;
  48. }
  49.  
  50. #menu ul li{
  51. display: block;
  52. }
  53.  
  54. #menu ul li a{
  55. color: white;
  56. text-decoration: none;
  57. text-transform: uppercase;
  58. }
  59.  
  60. #menu ul li a:hover{
  61. color: black;
  62. }
  63.  
  64. #menu #closeMenu{
  65. position: absolute;
  66. top: 60px;
  67. right: 40px;
  68. }
  69. </style>
  70. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css">
  71. </head>
  72. <body>
  73.  
  74. <div id="openMenu" onclick="openMenu()" ><i class="fas fa-bars"></i></div>
  75.  
  76. <div id="menu">
  77. <div id="closeMenu"><i class="fas fa-times"></i></div>
  78. <ul id="items">
  79. <li><a href="#">Home</a></li>
  80. <li><a href="#">About</a></li>
  81. <li><a href="#">Contact</a></li>
  82. <li><a href="#">More</a></li>
  83. </ul>
  84.  
  85. </div>
  86.  
  87. <form name="myForm" action="#" method="POST" onsubmit="return validateForm()">
  88. Navn:
  89. <input name="formName" id="formName" type="text">
  90. <span id="name-error">Name must be filled</span>
  91.  
  92. Telfonnummer:
  93. <input name="formPhone" id="formPhone" type="number">
  94. <span id="phone-error">Phone must be filled</span>
  95.  
  96. Email:
  97. <input name="formEmail" id="formEmail" type="text">
  98. <span id="email-error">Email must be filled</span>
  99.  
  100. <button type="submit">Send</button>
  101. </form>
  102. <script src="js/script.js"></script>
  103. </body>
  104. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement