hamburger.css 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. #nav-icon span {
  2. display: block;
  3. position: absolute;
  4. height: 2px;
  5. width: 50%;
  6. background: #FFF;
  7. opacity: 1;
  8. -webkit-transform: rotate(0deg);
  9. -moz-transform: rotate(0deg);
  10. -o-transform: rotate(0deg);
  11. transform: rotate(0deg);
  12. -webkit-transition: .25s ease-in-out;
  13. -moz-transition: .25s ease-in-out;
  14. -o-transition: .25s ease-in-out;
  15. transition: .25s ease-in-out;
  16. }
  17. #nav-icon span:nth-child(even) {
  18. left: 50%;
  19. border-radius: 0 9px 9px 0;
  20. }
  21. #nav-icon span:nth-child(odd) {
  22. left:0px;
  23. border-radius: 9px 0 0 9px;
  24. }
  25. #nav-icon span:nth-child(1), #nav-icon span:nth-child(2) {
  26. top: 0px;
  27. }
  28. #nav-icon span:nth-child(3), #nav-icon span:nth-child(4) {
  29. top: 6px;
  30. }
  31. #nav-icon span:nth-child(5), #nav-icon span:nth-child(6) {
  32. top: 12px;
  33. }
  34. #nav-icon.open span:nth-child(1),#nav-icon.open span:nth-child(6) {
  35. -webkit-transform: rotate(45deg);
  36. -moz-transform: rotate(45deg);
  37. -o-transform: rotate(45deg);
  38. transform: rotate(45deg);
  39. }
  40. #nav-icon.open span:nth-child(2),#nav-icon.open span:nth-child(5) {
  41. -webkit-transform: rotate(-45deg);
  42. -moz-transform: rotate(-45deg);
  43. -o-transform: rotate(-45deg);
  44. transform: rotate(-45deg);
  45. }
  46. #nav-icon.open span:nth-child(1) {
  47. left: 3px;
  48. top: 3px;
  49. }
  50. #nav-icon.open span:nth-child(2) {
  51. left: calc(50%);
  52. top: 3px;
  53. }
  54. #nav-icon.open span:nth-child(3) {
  55. left: -50%;
  56. opacity: 0;
  57. }
  58. #nav-icon.open span:nth-child(4) {
  59. left: 100%;
  60. opacity: 0;
  61. }
  62. #nav-icon.open span:nth-child(5) {
  63. left: 3px;
  64. top: 10px;
  65. }
  66. #nav-icon.open span:nth-child(6) {
  67. left: calc(50%);
  68. top: 10px;
  69. }