hamburger.css 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. /* Basic styles */
  2. #mobile-header {
  3. font-family: sans-serif;
  4. right: 0;
  5. }
  6. #mobile-header {
  7. position: absolute;
  8. font-family: sans-serif;
  9. }
  10. /* Toggle functionality */
  11. #toggle {
  12. position: absolute;
  13. left: -100%;
  14. top: -100%;
  15. }
  16. #toggle:focus ~ .toggle-container .button-toggle,
  17. #toggle:checked ~ .toggle-container .button-toggle {
  18. -webkit-box-shadow: 0 0 0 8px rgba(0, 0, 0, .1), inset 0 0 0 8px rgba(0, 0, 0, .1);
  19. box-shadow: 0 0 0 8px rgba(0, 0, 0, .1), inset 0 0 0 8px rgba(0, 0, 0, .1);
  20. }
  21. #toggle:checked ~ .toggle-container .button-toggle:hover,
  22. #toggle:checked:focus ~ .toggle-container .button-toggle {
  23. -webkit-box-shadow: 0 0 0 8px rgba(0, 0, 0, .1), inset 0 0 0 8px rgba(0, 0, 0, .1), 0 0 0 8px rgba(0, 0, 0, .1), inset 0 0 0 8px rgba(0, 0, 0, .1);
  24. box-shadow: 0 0 0 8px rgba(0, 0, 0, .1), inset 0 0 0 8px rgba(0, 0, 0, .1), 0 0 0 8px rgba(0, 0, 0, .1), inset 0 0 0 8px rgba(0, 0, 0, .1);
  25. }
  26. #toggle:checked ~ .toggle-container .button-toggle:before {
  27. -webkit-transform: translateY(-50%) rotate(45deg) scale(1);
  28. transform: translateY(-50%) rotate(45deg) scale(1);
  29. }
  30. #toggle:checked ~ .toggle-container .button-toggle:after {
  31. -webkit-transform: translateY(-50%) rotate(-45deg) scale(1);
  32. transform: translateY(-50%) rotate(-45deg) scale(1);
  33. }
  34. #toggle:checked ~ .nav {
  35. margin-bottom: 100px;
  36. pointer-events: auto;
  37. -webkit-transform: translate(0px, 50px);
  38. transform: translate(0px, 50px);
  39. }
  40. #toggle:checked ~ .nav .nav-item {
  41. font-family: 'akrobat-regular';
  42. color: black;
  43. letter-spacing: 0;
  44. height: 40px;
  45. line-height: 40px;
  46. float: none;
  47. text-align: right;
  48. margin: 0;
  49. opacity: 1;
  50. -webkit-transform: scaleY(1);
  51. transform: scaleY(1);
  52. -webkit-transition: .5s, opacity .1s;
  53. transition: .5s, opacity .1s;
  54. }
  55. #toggle:checked ~ .nav .nav-item:nth-child(1),
  56. #toggle:checked ~ .nav .nav-item:nth-child(1):before {
  57. -webkit-transition-delay: .15s;
  58. transition-delay: .15s;
  59. }
  60. #toggle:checked ~ .nav .nav-item:nth-child(2),
  61. #toggle:checked ~ .nav .nav-item:nth-child(2):before {
  62. -webkit-transition-delay: .01s;
  63. transition-delay: .01s;
  64. }
  65. #toggle:checked ~ .nav .nav-item:nth-child(3),
  66. #toggle:checked ~ .nav .nav-item:nth-child(3):before {
  67. -webkit-transition-delay: .05s;
  68. transition-delay: .05s;
  69. }
  70. #toggle:checked ~ .nav .nav-item:nth-child(4),
  71. #toggle:checked ~ .nav .nav-item:nth-child(4):before {
  72. -webkit-transition-delay: 0s;
  73. transition-delay: 0s;
  74. }
  75. #toggle:checked ~ .nav .nav-item:before {
  76. opacity: 0;
  77. }
  78. /* Toggle button */
  79. .button-toggle {
  80. position: absolute;
  81. display: inline-block;
  82. right: 0;
  83. width: 20px;
  84. height: 20px;
  85. margin: 25px 0;
  86. -webkit-box-shadow: 0 0 0 8px rgba(0, 0, 0, .1), inset 0 0 0 8px rgba(0, 0, 0, .1);
  87. box-shadow: 0 0 0 8px rgba(0, 0, 0, .1), inset 0 0 0 8px rgba(0, 0, 0, .1);
  88. border: none;
  89. cursor: pointer;
  90. border-radius: 100%;
  91. -webkit-transition: .6s;
  92. transition: .6s;
  93. }
  94. /* button X container (toggled) */
  95. .button-toggle:before, .button-toggle:after {
  96. position: absolute;
  97. content: '';
  98. top: 50%;
  99. /* left: 0; */
  100. right: 0;
  101. width: 100%;
  102. height: 2px;
  103. background-color: black;
  104. border-radius: 5px;
  105. -webkit-transition: .5s;
  106. transition: .5s;
  107. }
  108. /* button \ container */
  109. .button-toggle:before {
  110. -webkit-transform: translateY(-50%) rotate(45deg) scale(0);
  111. transform: translateY(-50%) rotate(45deg) scale(0);
  112. }
  113. /* button / container */
  114. .button-toggle:after {
  115. -webkit-transform: translateY(-50%) rotate(-45deg) scale(0);
  116. transform: translateY(-50%) rotate(-45deg) scale(0);
  117. }
  118. /* Menu */
  119. .nav {
  120. display: block;
  121. margin: 25px 0;
  122. pointer-events: none;
  123. -webkit-transition: .5s;
  124. transition: .5s;
  125. }
  126. .nav-item {
  127. position: relative;
  128. display: block;
  129. clear: both;
  130. color: transparent;
  131. font-size: 14px;
  132. letter-spacing: -6.2px;
  133. height: 7px;
  134. line-height: 7px;
  135. text-transform: uppercase;
  136. white-space: nowrap;
  137. -webkit-transform: scaleY(.2);
  138. transform: scaleY(.2);
  139. -webkit-transition: .5s, opacity .1s;
  140. transition: .5s, opacity .1s;
  141. }
  142. .nav-item:nth-child(1),
  143. .nav-item:nth-child(1):before {
  144. -webkit-transition-delay: 0s;
  145. transition-delay: 0s;
  146. }
  147. .nav-item:nth-child(2),
  148. .nav-item:nth-child(2):before {
  149. -webkit-transition-delay: .05s;
  150. transition-delay: .05s;
  151. }
  152. .nav-item:nth-child(3),
  153. .nav-item:nth-child(3):before {
  154. -webkit-transition-delay: .1s;
  155. transition-delay: .1s;
  156. }
  157. .nav-item:nth-child(4),
  158. .nav-item:nth-child(4):before {
  159. -webkit-transition-delay: .15s;
  160. transition-delay: .15s;
  161. }
  162. .nav-item:nth-child(1) {
  163. letter-spacing: -8px;
  164. }
  165. .nav-item:nth-child(2) {
  166. letter-spacing: -7px;
  167. }
  168. .nav-item:nth-child(n + 4) {
  169. letter-spacing: -8px;
  170. margin-top: -7px;
  171. opacity: 0;
  172. }
  173. .nav-item:before {
  174. position: absolute;
  175. content: '';
  176. top: 50%;
  177. width: 100%;
  178. height: 2px;
  179. background-color: black;
  180. -webkit-transform: translateY(-50%) scaleY(5);
  181. transform: translateY(-50%) scaleY(5);
  182. -webkit-transition: .5s;
  183. transition: .5s;
  184. }
  185. /* .main-layout {
  186. -webkit-transition: .5s;
  187. -moz-transition: .5s;
  188. -o-transition: .5s;
  189. transition: .5s;
  190. }
  191. .main-layout:before {
  192. position: absolute;
  193. content: '';
  194. top: 0;
  195. left: 0;
  196. width: 100%;
  197. height: 100%;
  198. background-color: transparent;
  199. z-index: 2;
  200. -webkit-transition: .5s;
  201. -moz-transition: .5s;
  202. -o-transition: .5s;
  203. transition: .5s;
  204. }
  205. #toggle:checked ~ .main-layout {
  206. padding-top: 30px;
  207. }
  208. #toggle:checked ~ .main-layout:before {
  209. background-color: rgba(0, 0, 0, .3);
  210. } */