header.css 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. header {
  2. padding: 0 !important;
  3. }
  4. header .top-nav {
  5. display: flex;
  6. flex-direction: row;
  7. align-items: center;
  8. justify-content: space-between;
  9. color: #000;
  10. height: 100px;
  11. padding: 1em;
  12. }
  13. header .menu {
  14. display: flex;
  15. flex-direction: row;
  16. list-style-type: none;
  17. margin: 0;
  18. padding: 0;
  19. }
  20. header .menu a {
  21. color: #000;
  22. text-decoration: none;
  23. }
  24. header .menu a:hover {
  25. text-decoration: underline;
  26. }
  27. header .menu > li {
  28. margin: 0 1rem;
  29. overflow: hidden;
  30. }
  31. header .menu-button-container {
  32. display: none;
  33. height: 100%;
  34. width: 30px;
  35. cursor: pointer;
  36. flex-direction: column;
  37. justify-content: center;
  38. align-items: center;
  39. }
  40. header #menu-toggle {
  41. display: none;
  42. }
  43. header .menu-button,
  44. header .menu-button::before,
  45. header .menu-button::after {
  46. display: block;
  47. background-color: #000;
  48. position: absolute;
  49. height: 4px;
  50. width: 30px;
  51. transition: transform 1s cubic-bezier(0.23, 1, 0.32, 1);
  52. border-radius: 2px;
  53. }
  54. header .menu-button::before {
  55. content: "";
  56. margin-top: -8px;
  57. }
  58. header .menu-button::after {
  59. content: "";
  60. margin-top: 8px;
  61. }
  62. header #menu-toggle:checked + .menu-button-container .menu-button::before {
  63. margin-top: 0px;
  64. transform: rotate(405deg);
  65. }
  66. header #menu-toggle:checked + .menu-button-container .menu-button {
  67. background: rgba(255, 255, 255, 0);
  68. }
  69. header #menu-toggle:checked + .menu-button-container .menu-button::after {
  70. margin-top: 0px;
  71. transform: rotate(-405deg);
  72. }
  73. @media (max-width: 700px) {
  74. header .menu-button-container {
  75. display: flex;
  76. }
  77. header .menu {
  78. position: absolute;
  79. top: 50px;
  80. margin-top: 50px;
  81. left: 0;
  82. flex-direction: column;
  83. width: 100%;
  84. justify-content: center;
  85. align-items: center;
  86. }
  87. header .menu li {
  88. display: flex;
  89. justify-content: center;
  90. align-items: center;
  91. }
  92. header .menu li a {
  93. color: #fff !important;
  94. }
  95. header #menu-toggle ~ .menu li {
  96. height: 0;
  97. margin: 0;
  98. padding: 0;
  99. border: 0;
  100. transition: height 400ms cubic-bezier(0.23, 1, 0.32, 1);
  101. }
  102. header #menu-toggle:checked ~ .menu li {
  103. border: 1px solid #333;
  104. height: 2.5em;
  105. padding: 0.5em;
  106. transition: height 400ms cubic-bezier(0.23, 1, 0.32, 1);
  107. }
  108. header .menu > li {
  109. display: flex;
  110. justify-content: center;
  111. margin: 0;
  112. padding: 0.5em 0;
  113. width: 100%;
  114. background-color: #222;
  115. }
  116. header .menu > li:not(:last-child) {
  117. border-bottom: 1px solid #444;
  118. }
  119. }/*# sourceMappingURL=header.css.map */