navbar.css 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  1. .top-navbar {
  2. position: fixed;
  3. left: 0;
  4. top: 0;
  5. width: 100%;
  6. height: 50px;
  7. z-index: 99999;
  8. transition: all 0.4s ease-out;
  9. margin: 0px;
  10. padding-top: 0.4rem;
  11. text-align: center;
  12. }
  13. /* --- initial state start ------ */
  14. .initial-navbar {
  15. background-color: transparent;
  16. }
  17. .initial-navbar .navbar-brand {
  18. color: #c0ccda;
  19. font-weight: 600;
  20. }
  21. .initial-navbar li a {
  22. color: #c0ccda;
  23. }
  24. .initial-navbar .navbar-nav .active,
  25. .initial-navbar li a:hover {
  26. color: #f9fafc;
  27. transition: all 0.3s ease-out;
  28. transform: translateY(-2px);
  29. }
  30. .navbar-collapse {
  31. margin-top: -5px;
  32. }
  33. .navbar-collapse.show,
  34. .navbar-collapse.collapsing {
  35. background-color: #f9fafc;
  36. padding-left: 1rem;
  37. }
  38. /* --- initial state end ------ */
  39. /* --- state after scroll start --- */
  40. .final-navbar {
  41. background-color: #f9fafc;
  42. color: #1c2d41;
  43. transition: all 0.3s ease-out;
  44. }
  45. .final-navbar .navbar-brand {
  46. color: #1c2d41;
  47. font-weight: 600;
  48. }
  49. .final-navbar li a {
  50. color: #1c2d41;
  51. font-weight: 500;
  52. transition: all 0.3s ease-out;
  53. border-bottom: 2px solid#F9FAFC;
  54. }
  55. .final-navbar .navbar-nav .active,
  56. .final-navbar li a:hover {
  57. color: #2098d1;
  58. transition: all 0.3s ease-out;
  59. border-bottom: 2px solid #2098d1;
  60. background: rgb(2, 0, 36);
  61. background: linear-gradient(
  62. 90deg,
  63. rgba(2, 0, 36, 1) 0%,
  64. rgba(34, 136, 168, 0.1) 0%
  65. );
  66. }
  67. .navbar-collapse.show li a,
  68. .navbar-collapse.collapsing li a {
  69. color: #1c2d41;
  70. font-weight: 500;
  71. transition: all 0.3s ease-out;
  72. }
  73. .navbar-collapse.show .navbar-nav .active,
  74. .navbar-collapse.show .navbar-nav a:hover {
  75. color: #2098d1;
  76. }
  77. #top-navbar-divider {
  78. margin-top: 10px;
  79. }
  80. /* --- state after scroll end --- */
  81. #top-navbar-divider {
  82. background: rgba(192, 204, 218, 0.8);
  83. height: 20px;
  84. width: 2px;
  85. }
  86. .final-navbar #top-navbar-divider {
  87. background: rgba(0, 0, 0, 0.6);
  88. }
  89. #top-navbar-divider {
  90. height: 20px;
  91. width: 2px;
  92. }
  93. .navbar-brand img {
  94. width: 42px;
  95. padding: 5px;
  96. margin-left: -10px;
  97. }
  98. .top-navbar .dropdown-menu {
  99. box-shadow: 0px 8px 56px rgba(15, 80, 100, 0.16);
  100. border: 1px solid #fff;
  101. max-height: 0vh;
  102. overflow: hidden;
  103. display: block;
  104. visibility: hidden;
  105. transition: all 0.3s ease-out;
  106. }
  107. .top-navbar .dropdown-menu.show {
  108. max-height: 100vh;
  109. visibility: visible;
  110. transition: all 0.3s ease-in;
  111. }
  112. .top-navbar .dropdown-menu a {
  113. color: #1c2d41;
  114. border-bottom: none;
  115. }
  116. .top-navbar .dropdown-menu a:hover {
  117. color: #2098d1;
  118. transition: all 0.3s ease-out;
  119. border-bottom: none;
  120. background: rgb(2, 0, 36);
  121. background: linear-gradient(
  122. 90deg,
  123. rgba(2, 0, 36, 1) 0%,
  124. rgba(34, 136, 168, 0.2) 0%
  125. );
  126. }
  127. /* ============= Device specific fixes ======= */
  128. /* Large screens such as TV */
  129. @media only screen and (min-width: 1824px) {
  130. }
  131. /* Extra large devices (large desktops, 1200px and up) */
  132. @media (max-width: 1400px) {
  133. }
  134. @media (max-width: 1200px) {
  135. }
  136. /* IPad Pro */
  137. @media (max-width: 1024px) {
  138. .top-navbar {
  139. height: -moz-fit-content;
  140. height: fit-content;
  141. padding-bottom: 0px;
  142. padding-top: 0px;
  143. }
  144. .top-navbar .container {
  145. max-width: 100%;
  146. }
  147. .initial-navbar .navbar-nav .active,
  148. .initial-navbar li a:hover {
  149. color: #2098d1;
  150. transition: all 0.3s ease-out;
  151. }
  152. .final-navbar .navbar-nav .active,
  153. .final-navbar li a:hover {
  154. color: #2098d1;
  155. transition: none;
  156. border-bottom: none;
  157. background: transparent;
  158. }
  159. .final-navbar li a {
  160. border-bottom: none;
  161. }
  162. .dropdown-divider {
  163. border-top: 1px solid #c0ccda;
  164. }
  165. #top-navbar-divider {
  166. background: rgba(0, 0, 0, 0.6);
  167. height: auto;
  168. width: auto;
  169. margin-right: 15px;
  170. }
  171. .top-navbar .dropdown-menu {
  172. text-align: center;
  173. margin-bottom: 0.5rem;
  174. margin-right: 1rem;
  175. transition: all 0.3s ease-out;
  176. }
  177. }
  178. /* Large devices (desktops, 992px and up) */
  179. @media (max-width: 992px) {
  180. .initial-navbar .navbar-nav .active,
  181. .initial-navbar li a:hover {
  182. color: #2098d1;
  183. transition: all 0.3s ease-out;
  184. }
  185. .final-navbar .navbar-nav .active,
  186. .final-navbar li a:hover {
  187. color: #2098d1;
  188. transition: none;
  189. border-bottom: none;
  190. background: transparent;
  191. }
  192. .final-navbar li a {
  193. border-bottom: none;
  194. }
  195. .dropdown-divider {
  196. border-top: 1px solid #c0ccda;
  197. }
  198. #top-navbar-divider {
  199. background: rgba(0, 0, 0, 0.6);
  200. height: auto;
  201. width: auto;
  202. margin-right: 15px;
  203. }
  204. }
  205. /* Medium devices (tablets, 768px and up) */
  206. @media only screen and (max-width: 768px) {
  207. .initial-navbar .navbar-nav .active,
  208. .initial-navbar li a:hover {
  209. color: #2098d1;
  210. transition: all 0.3s ease-out;
  211. }
  212. .final-navbar .navbar-nav .active,
  213. .final-navbar li a:hover {
  214. color: #2098d1;
  215. transition: none;
  216. border-bottom: none;
  217. background: transparent;
  218. }
  219. .final-navbar li a {
  220. border-bottom: none;
  221. }
  222. .dropdown-divider {
  223. border-top: 1px solid #c0ccda;
  224. }
  225. #top-navbar-divider {
  226. background: rgba(0, 0, 0, 0.6);
  227. height: auto;
  228. width: auto;
  229. margin-right: 15px;
  230. }
  231. }
  232. /* Small devices (landscape phones, 576px and up) */
  233. @media only screen and (max-width: 576px) {
  234. .top-navbar .dropdown-menu {
  235. margin-left: -1rem;
  236. margin-right: 0rem;
  237. }
  238. }
  239. /* iPhoneX, iPhone 6,7,8 */
  240. @media only screen and (max-width: 375px) {
  241. }
  242. /* Galaxy S5, Moto G4 */
  243. @media only screen and (max-width: 360px) {
  244. }
  245. /* iPhone 5 or before */
  246. @media only screen and (max-width: 320px) {
  247. }