header.scss 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. body {
  2. margin: 0;
  3. }
  4. .header-fixed {
  5. position: fixed;
  6. top: 0;
  7. z-index: 1;
  8. width: 100%;
  9. background-color:white;
  10. }
  11. .navbar {
  12. display: flex;
  13. line-height: 60px;
  14. background-color:yellow;
  15. }
  16. .navbar .logo {
  17. flex: 3;
  18. padding-left:2em;
  19. }
  20. .navbar nav {
  21. flex: 8;
  22. }
  23. .navbar label {
  24. user-select: none;
  25. cursor: pointer;
  26. padding: 28px 20px;
  27. position: relative;
  28. z-index: 3;
  29. }
  30. .navbar label i {
  31. height: 2px;
  32. position: relative;
  33. transition: background .2s ease-out;
  34. width: 18px;
  35. font-style: normal;
  36. font-weight: normal;
  37. }
  38. .navbar label i:before,
  39. .navbar label i:after {
  40. content: '';
  41. height: 100%;
  42. position: absolute;
  43. transition: all .2s ease-out;
  44. width: 100%;
  45. }
  46. .navbar label i,
  47. .navbar label i:before,
  48. .navbar label i:after {
  49. display: block;
  50. background:black;
  51. }
  52. .navbar label i:before {
  53. top: 5px;
  54. }
  55. .navbar label i:after {
  56. top: -5px;
  57. }
  58. .navbar #navbar-toggle {
  59. display: none;
  60. }
  61. .header #navbar-toggle:checked ~ .menu {
  62. visibility: visible;
  63. opacity: 0.99;
  64. }
  65. .header #navbar-toggle:checked ~ label {
  66. background: #212121;
  67. border-radius: 50%;
  68. }
  69. .header #navbar-toggle:checked ~ label i {
  70. background: transparent;
  71. }
  72. .header #navbar-toggle:checked ~ label i:before {
  73. transform: rotate(-45deg);
  74. }
  75. .header #navbar-toggle:checked ~ label i:after {
  76. transform: rotate(45deg);
  77. }
  78. .header #navbar-toggle:checked ~ label:not(.steps) i:before,
  79. .header #navbar-toggle:checked ~ label:not(.steps) i:after {
  80. top: 0;
  81. }
  82. @media (max-width: 800px) {
  83. .navbar nav {
  84. visibility: hidden;
  85. opacity: 0;
  86. position: fixed;
  87. top: 0px;
  88. left: 0px;
  89. width: 100%;
  90. height: 100%;
  91. transition: all 0.3s ease-out;
  92. display: table;
  93. background: #ddd;
  94. }
  95. .navbar nav ul {
  96. margin: 0;
  97. padding: 20px 0;
  98. display: table-cell;
  99. vertical-align: middle;
  100. }
  101. .navbar nav li {
  102. display: block;
  103. padding: 20px 0;
  104. text-align: center;
  105. font-size: 50px;
  106. min-height: 50px;
  107. font-weight: bold;
  108. cursor: pointer;
  109. transition: all 0.3s ease-out;
  110. }
  111. }
  112. @media (min-width: 800px) {
  113. .navbar nav ul {
  114. margin: 0;
  115. padding: 0;
  116. display: flex;
  117. justify-content: space-around;
  118. text-align: right;
  119. list-style: none;
  120. }
  121. .navbar nav li {
  122. flex: 1;
  123. }
  124. .navbar nav li a {
  125. display: block;
  126. padding: 0 8px;
  127. line-height: 60px;
  128. }
  129. .navbar label {
  130. display: none;
  131. }
  132. .hidden-md {
  133. display:none !important;
  134. }
  135. }