Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 3.42 KB | None | 0 0
  1. @import url('https://fonts.googleapis.com/css?family=Work+Sans:300,600');
  2. :root {
  3.   --background: rgba(0, 214, 170, .85);
  4. }
  5. *, *::before, *::after {
  6.   box-sizing: border-box;
  7.  
  8. }
  9. html, body { height:100%; }
  10. body {
  11.     margin: 0;
  12.     background: #222;
  13.     font-family: 'Work Sans', sans-serif;
  14.     font-weight: 400;
  15. }
  16. .content {
  17.   height: 200vh;
  18.   background-image: url(//unsplash.it/1000/1000);
  19.   background-color: #333;
  20.   background-blend-mode: multiply;
  21.   background-size: cover;
  22.   display: grid;
  23.   place-items: center;
  24. }
  25. header{
  26.   background: var(--background);
  27.   text-align: center;
  28.   position: fixed;
  29.   z-index: 5;
  30.   width: 100%;
  31. }
  32.  
  33. .nav-toggle {
  34.   position: absolute !important;
  35.   top: -9999px !important;
  36.   left: -9999px !important;
  37. }
  38. .nav-toggle:focus ~ .nav-toggle-label {
  39.   outline: 3px solid rgba(lightblue, .75);
  40. }
  41. .nav-toggle-label {
  42.   position: absolute;
  43.   top: 0;
  44.   left: 0;
  45.   margin-left: 1em;
  46.   height: 100%;
  47.   display: flex;
  48.   align-items: center;
  49. }
  50. .nav-toggle-label span,
  51. .nav-toggle-label span::before,
  52. .nav-toggle-label span::after {
  53.   display: block;
  54.   background: white;
  55.   height: 2px;
  56.   width: 2em;
  57.   border-radius: 2px;
  58.   position: relative;
  59. }
  60. .nav-toggle-label span::before,
  61. .nav-toggle-label span::after {
  62.   content: '';
  63.   position: absolute;
  64. }
  65. .nav-toggle-label span::before {
  66.   bottom: 7px;
  67. }
  68. .nav-toggle-label span::after {
  69.   top: 7px;
  70. }
  71. nav {
  72.   position: absolute;
  73.   text-align: left;
  74.   top: 100%;
  75.   left: 0;
  76.   background: var(--background);
  77.   width: 100%;
  78.   transform: scale(1, 0);
  79.   transform-origin: top;
  80.   transition: transform 400ms ease-in-out;
  81. }
  82. nav ul {
  83.   margin: 0;
  84.   padding: 0;
  85.   list-style: none;
  86. }
  87. nav li {
  88.   margin-bottom: 1em;
  89.   margin-left: 1em;
  90. }
  91. nav a {
  92.   color: white;
  93.   text-decoration: none;
  94.   font-size: 1.2rem;
  95.   text-transform: uppercase;
  96.   opacity: 0;
  97.   transition: opacity 150ms ease-in-out;
  98. }
  99. nav a:hover {
  100.   color: #000;
  101. }
  102. .nav-toggle:checked ~ nav {
  103.   transform: scale(1,1);
  104. }
  105. .nav-toggle:checked ~ nav a {
  106.   opacity: 1;
  107.   transition: opacity 250ms ease-in-out 250ms;
  108. }
  109. @media screen and (min-width: 800px) {
  110.   .nav-toggle-label {
  111.     display: none;
  112.   }
  113.   header {
  114.     display: grid;
  115.     grid-template-columns: 1fr auto minmax(600px, 3fr) 1fr;
  116.   }
  117.   .logo {
  118.     grid-column: 2 / 3;
  119.   }
  120.   nav {
  121.       all: unset;
  122.     position: relative;
  123.     text-align: left;
  124.     transition: none;
  125.     transform: scale(1,1);
  126.     background: none;
  127.     top: initial;
  128.     left: initial;
  129.     grid-column: 3 / 4;
  130.     display: flex;
  131.     justify-content: flex-end;
  132.     align-items: center;
  133.   }
  134.   nav ul {
  135.      display: flex;
  136.   }
  137.   nav li {
  138.     margin-left: 3em;
  139.     margin-bottom: 0;
  140.   }
  141.   nav a {
  142.     opacity: 1;
  143.     position: relative;
  144.   }
  145.   nav a::before {
  146.     content: '';
  147.     display: block;
  148.     height: 5px;
  149.     background: black;
  150.     position: absolute;
  151.     top: -.75em;
  152.     left: 0;
  153.     right: 0;
  154.     transform: scale(0, 1);
  155.     transition: transform ease-in-out 250ms;
  156.   }
  157.   nav a:hover::before {
  158.     transform: scale(1,1);
  159.   }
  160. }
  161. #wrap{
  162.   margin-top: 120px;
  163.   position: fixed;
  164.   width: 100%;
  165. }
  166. #container{
  167.   background-color: #333;
  168.  
  169. }
  170. #left{
  171.   background-color: #333;
  172.   float: left;
  173.   margin: 20px;
  174. }
  175. #right{
  176.   background-color: #333;
  177.   margin: 20px;
  178.   float: right;
  179. }
  180. footer{
  181.   background: var(--background);
  182.   margin-bottom: 0;
  183.   vertical-align: bottom; !important;
  184.   height: 80px;
  185. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement