Advertisement
Guest User

Untitled

a guest
Jul 25th, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.69 KB | None | 0 0
  1.  
  2. <style>
  3.  
  4. @keyframes checked-anim {
  5. 50% {
  6. width: 3000px;
  7. height: 3000px;
  8. }
  9. 100% {
  10. width: 100%;
  11. height: 100%;
  12. border-radius: 0;
  13. }
  14. }
  15. @keyframes not-checked-anim {
  16. 0% {
  17. width: 3000px;
  18. height: 3000px;
  19. }
  20. }
  21. li, a {
  22. margin: 75px auto -55px;
  23. color: #03A9F4;
  24. font: 14pt "Roboto", sans-serif;
  25. font-weight: 700;
  26. line-height: 1.8;
  27. text-decoration: none;
  28. text-transform: none;
  29. list-style: none;
  30. outline: 0;
  31. display: none;
  32. }
  33. li {
  34. width: 230px;
  35. text-indent: 56px;}
  36. a:focus {
  37. display: block;
  38. color: #333;
  39. background-color: #eee;
  40. transition: all .5s;
  41. }
  42.  
  43. html, body {
  44. margin: 0;
  45. padding: 0;
  46. background-color: #03A9F4;
  47. font-family: 'Roboto', sans-serif;
  48. overflow: hidden;
  49. }
  50.  
  51. #trigger, #burger, #burger:before, #burger:after {
  52. position: absolute;
  53. top: 25px;
  54. right: 25px;
  55. background: #03A9F4;
  56. width: 30px;
  57. height: 5px;
  58. transition: .2s ease;
  59. cursor: pointer;
  60. z-index: 1;
  61. }
  62. #trigger {
  63. height: 25px;
  64. background: none;
  65. }
  66. #burger:before {
  67. content: " ";
  68. top: 10px;
  69. left: 0;
  70. }
  71. #burger:after {
  72. content: " ";
  73. top: 20px;
  74. left: 0;
  75. }
  76. #menu-toggle:checked + #trigger + #burger {
  77. top: 35px;
  78. transform: rotate(180deg);
  79. transition: transform .2s ease;
  80. }
  81.  
  82. #menu-toggle:checked + #trigger + #burger:before {
  83. width: 20px;
  84. top: -2px;
  85. left: 18px;
  86. transform: rotate(45deg) translateX(-5px);
  87. transition: transform .2s ease;
  88. }
  89. #menu-toggle:checked + #trigger + #burger:after {
  90. width: 20px;
  91. top: 2px;
  92. left: 18px;
  93. transform: rotate(-45deg) translateX(-5px);
  94. transition: transform .2s ease;
  95. }
  96. #menu-top-nav {
  97. position: absolute;
  98. right:0;
  99. margin: 0; padding: 0;
  100. width: 90px;
  101. height: 90px;
  102. background-color: #fff;
  103. border-bottom-left-radius: 100%;
  104. box-shadow: 0 2px 5px rgba(0,0,0,0.26);
  105. animation: not-checked-anim .2s both;
  106. transition: .2s;
  107. }
  108. #menu-toggle:checked + #trigger + #burger + #menu-top-nav {
  109. animation: checked-anim 1s ease both;
  110. }
  111. #menu-toggle:checked + #trigger ~ #menu-top-nav > li, a {
  112. display: block;
  113. }
  114. [type="checkbox"]:not(:checked), [type="checkbox"]:checked {
  115. display: none;
  116. }
  117.  
  118. </style>
  119.  
  120.  
  121. <input type="checkbox" id="menu-toggle"/>
  122. <label id="trigger" for="menu-toggle"></label>
  123. <label id="burger" for="menu-toggle"></label>
  124. <ul id="menu-top-nav">
  125. <li><a href="#">Home</a></li>
  126. <li><a href="#">About</a></li>
  127. <li><a href="#">Portfolio</a></li>
  128. <li><a href="#">Contact</a></li>
  129. </ul>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement