_navbar.scss 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. #nav-container {
  2. width: 66.666%;
  3. @media only screen and (max-width:58em) {
  4. width: 95%;
  5. }
  6. @media only screen and (max-width:68em) and (min-width:58em) {
  7. width: 78.333%;
  8. }
  9. }
  10. #menu {
  11. background: #222222;
  12. color: #fff;
  13. height: 3.75em;
  14. padding-left: 28px;
  15. border-radius: 1.875em;
  16. }
  17. #menu ul,
  18. #menu li {
  19. margin: 0 auto;
  20. padding: 0;
  21. list-style: none;
  22. }
  23. #menu ul {
  24. width: 100%;
  25. }
  26. #menu li {
  27. float: left;
  28. display: inline;
  29. position: relative;
  30. }
  31. #menu a {
  32. display: block;
  33. line-height: 60px;
  34. padding: 0 14px;
  35. text-decoration: none;
  36. color: #ffffff;
  37. font-size: 16px;
  38. }
  39. #menu a.dropdown-arrow:after {
  40. content: "\23F7";
  41. margin-left: 5px;
  42. }
  43. #menu li a:hover {
  44. color: #ffffff;
  45. background: #0f4d8b;
  46. }
  47. #menu input {
  48. display: none;
  49. margin: 0;
  50. padding: 0;
  51. height: 60px;
  52. width: 100%;
  53. opacity: 0;
  54. cursor: pointer;
  55. }
  56. #menu label {
  57. display: none;
  58. line-height: 60px;
  59. text-align: center;
  60. position: absolute;
  61. left: 35px;
  62. }
  63. #menu label:before {
  64. font-size: 1.6em;
  65. content: "\2261";
  66. margin-left: 20px;
  67. }
  68. #menu ul.sub-menus {
  69. height: auto;
  70. overflow: hidden;
  71. width: 170px;
  72. background: #444444;
  73. position: absolute;
  74. z-index: 99;
  75. display: none;
  76. }
  77. #menu ul.sub-menus li {
  78. display: block;
  79. width: 100%;
  80. }
  81. #menu ul.sub-menus a {
  82. color: #ffffff;
  83. font-size: 16px;
  84. }
  85. #menu li:hover ul.sub-menus {
  86. display: block;
  87. }
  88. #menu ul.sub-menus a:hover {
  89. background: #0f4d8b;
  90. color: #ffffff;
  91. }
  92. @media screen and (max-width: 800px) {
  93. #menu {
  94. position: relative;
  95. }
  96. #menu ul {
  97. background: #111;
  98. position: absolute;
  99. top: 100%;
  100. right: 0;
  101. left: 0;
  102. z-index: 3;
  103. height: auto;
  104. display: none;
  105. }
  106. #menu ul.sub-menus {
  107. width: 100%;
  108. position: static;
  109. }
  110. #menu ul.sub-menus a {
  111. padding-left: 30px;
  112. }
  113. #menu li {
  114. display: block;
  115. float: none;
  116. width: auto;
  117. }
  118. #menu input,
  119. #menu label {
  120. position: absolute;
  121. top: 0;
  122. left: 0;
  123. display: block;
  124. }
  125. #menu input {
  126. z-index: 4;
  127. }
  128. #menu input:checked + label {
  129. color: white;
  130. }
  131. #menu input:checked + label:before {
  132. content: "\00d7";
  133. }
  134. #menu input:checked ~ ul {
  135. display: block;
  136. }
  137. }