hamburger.css 7.2 KB

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