Advertisement
SpykeRel04D

Untitled

Jul 19th, 2021
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.25 KB | None | 0 0
  1. <header>
  2. <div class="container">
  3. <div class="fix"></div>
  4. <div class="main">
  5. <div class="logo-container">
  6. <div class="secondary"></div>
  7. <div class="primary logo"><a>LOGO</a></div>
  8. </div>
  9. <nav class="nav">
  10. <div class="primary">
  11. <div class="links">
  12. <ul>
  13. <li class="styledlink root"><a>Item 01</a></li>
  14. <li class="styledlink root"><a>Item 02</a></li>
  15. <li class="styledlink root"><a>Item 03</a></li>
  16. <li class="styledlink root"><a>Item 04</a></li>
  17. </ul>
  18. </div>
  19. </div>
  20. <div class="secondary central">
  21. <div class="links">
  22. <ul>
  23. <li class="styledlink"><a>Submenu 01</a></li>
  24. <li class="styledlink"><a>Submenu 02</a></li>
  25. <li class="styledlink"><a>Submenu 03</a></li>
  26. </ul>
  27. </div>
  28. </div>
  29. </nav>
  30. <div class="cta-container">
  31. <div class="secondary"></div>
  32. <div class="primary cta"><a>CTA EXAMPLE</a></div>
  33. </div>
  34. </div>
  35. <div class="hamburger"></div>
  36. </div>
  37. </header>
  38.  
  39. /* 54 i 35 */
  40.  
  41. *,
  42. *::before,
  43. *::after {
  44. box-sizing: border-box;
  45. }
  46.  
  47. body,
  48. h1,
  49. h2,
  50. h3,
  51. h4,
  52. p,
  53. ul,
  54. ol,
  55. li,
  56. figure,
  57. figcaption,
  58. blockquote,
  59. dl,
  60. dd {
  61. margin: 0;
  62. }
  63.  
  64. ul,
  65. ol {
  66. list-style: none;
  67. padding: 0;
  68. }
  69.  
  70. header {
  71. box-sizing: border-box;
  72. height: auto;
  73. padding: 0;
  74. pointer-events: none;
  75. position: -webkit-sticky;
  76. position: sticky;
  77. top: 0;
  78. width: 100%;
  79. z-index: 1080;
  80. }
  81.  
  82. .container {
  83. background: #fff;
  84. box-shadow: 0px 0px 20px 0px rgba(122, 122, 122, 0.1);
  85. display: flex;
  86. pointer-events: auto;
  87. position: sticky;
  88. top: 0;
  89. width: 100%;
  90. z-index: -1;
  91. }
  92.  
  93. .fix {
  94. display: none;
  95. }
  96.  
  97. .main {
  98. display: flex;
  99. flex-direction: row;
  100. }
  101.  
  102. .main .logo-container a {
  103. line-height: 0;
  104. }
  105.  
  106. .main .logo-container {
  107. flex: 1;
  108. }
  109.  
  110. .main .cta-container {
  111. align-items: center;
  112. background: #fff;
  113. bottom: 0;
  114. display: flex;
  115. justify-content: center;
  116. left: 0;
  117. padding: 16px 40px;
  118. position: fixed;
  119. width: 100vw;
  120. }
  121.  
  122. .primary {
  123. align-items: center;
  124. display: flex;
  125. background: #fff;
  126. }
  127.  
  128. .primary.logo {
  129. justify-content: flex-end;
  130. height: 54px;
  131. margin-left: 24px;
  132. }
  133.  
  134. .primary.cta {
  135. justify-content: center;
  136. width: 100%;
  137. }
  138.  
  139. .secondary {
  140. align-items: center;
  141. display: flex;
  142. }
  143.  
  144. .secondary .links ul .styledlink a,
  145. .secondary .links ul .styledlink button {
  146. color: #646060;
  147. justify-content: flex-start;
  148. }
  149.  
  150. .styledlink {
  151. padding: 24px 0;
  152. position: relative;
  153. width: 100%;
  154. }
  155.  
  156. .styledlink button {
  157. padding-right: 8px;
  158. width: 100%;
  159. }
  160.  
  161. .styledlink a,
  162. .styledlink button {
  163. align-items: center;
  164. color: #303030;
  165. display: flex;
  166. justify-content: space-between;
  167. margin-left: 24px;
  168. text-decoration: none;
  169. }
  170.  
  171. .nav {
  172. background: #fff;
  173. display: flex;
  174. flex-direction: column;
  175. height: calc(100vh - 54px);
  176. left: 0;
  177. overflow-x: hidden;
  178. overflow-y: auto;
  179. position: fixed;
  180. top: 54px;
  181. transform: translateX(100%);
  182. transition: 0.65s;
  183. width: 100%;
  184. z-index: 1080;
  185. }
  186.  
  187. .nav.open {
  188. transform: translateX(0);
  189. }
  190.  
  191. .nav .links {
  192. flex: initial;
  193. width: 100%;
  194. }
  195.  
  196. .nav .links ul {
  197. align-items: center;
  198. display: flex;
  199. flex-direction: column;
  200. justify-content: center;
  201. }
  202.  
  203.  
  204. @media (min-width: 960px) {
  205. header {
  206. top: -35px;
  207. }
  208.  
  209. .container {
  210. align-items: center;
  211. flex-direction: column;
  212. position: sticky;
  213. }
  214.  
  215. .fix {
  216. display: initial;
  217. height: 35px;
  218. background: #f7f7f7;
  219. position: absolute;
  220. width: 100%;
  221. }
  222.  
  223. .main {
  224. position: relative;
  225. max-width: 1280px;
  226. width: 100%;
  227. }
  228.  
  229. .main .logo-container {
  230. align-items: flex-start;
  231. display: flex;
  232. flex-direction: column;
  233. height: auto;
  234. }
  235.  
  236. .main .logo-container .logo {
  237. margin-left: 8px;
  238. justify-content: flex-start;
  239. }
  240.  
  241. .main .cta-container {
  242. align-items: flex-end;
  243. flex-direction: column;
  244. flex: 1;
  245. height: auto;
  246. justify-content: flex-end;
  247. margin-right: 8px;
  248. padding: initial;
  249. position: initial;
  250. width: auto;
  251. }
  252.  
  253. .primary {
  254. height: 54px;
  255. width: 100%;
  256. }
  257.  
  258. .primary.logo {
  259. margin-left: auto
  260. }
  261.  
  262. .primary.cta {
  263. justify-content: flex-start;
  264. width: auto;
  265. }
  266.  
  267. .secondary {
  268. width: auto;
  269. background: #f7f7f7;
  270. height: 35px;
  271. width: 100%;
  272. }
  273.  
  274. .secondary.central {
  275. width: auto;
  276. position: absolute;
  277. top: 0;
  278. right: 0;
  279. }
  280.  
  281. .styledlink {
  282. padding: 16px 16px;
  283. width: auto;
  284. }
  285.  
  286. .styledlink button {
  287. padding-right: 0;
  288. }
  289.  
  290. .styledlink a,
  291. .styledlink button {
  292. margin: 0;
  293. }
  294.  
  295. .nav {
  296. align-items: center;
  297. background: #f7f7f7;
  298. flex-direction: column-reverse;
  299. flex: 7;
  300. height: auto;
  301. overflow-x: initial;
  302. overflow-y: initial;
  303. position: initial;
  304. transform: initial;
  305. width: auto;
  306. }
  307.  
  308. .nav .links ul {
  309. flex-direction: row;
  310. justify-content: flex-end;
  311. }
  312.  
  313. .nav .primary .links ul .styledlink {
  314. display: flex;
  315. height: 54px;
  316. padding: 0 16px;
  317. }
  318. }
  319.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement