pacman.css 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. /*========================================================
  2. DARK LAYOUT
  3. =========================================================*/
  4. @-webkit-keyframes rotate_pacman_half_up {
  5. 0% {
  6. transform: rotate(270deg);
  7. }
  8. 50% {
  9. transform: rotate(360deg);
  10. }
  11. 100% {
  12. transform: rotate(270deg);
  13. }
  14. }
  15. @keyframes rotate_pacman_half_up {
  16. 0% {
  17. transform: rotate(270deg);
  18. }
  19. 50% {
  20. transform: rotate(360deg);
  21. }
  22. 100% {
  23. transform: rotate(270deg);
  24. }
  25. }
  26. @-webkit-keyframes rotate_pacman_half_down {
  27. 0% {
  28. transform: rotate(90deg);
  29. }
  30. 50% {
  31. transform: rotate(0deg);
  32. }
  33. 100% {
  34. transform: rotate(90deg);
  35. }
  36. }
  37. @keyframes rotate_pacman_half_down {
  38. 0% {
  39. transform: rotate(90deg);
  40. }
  41. 50% {
  42. transform: rotate(0deg);
  43. }
  44. 100% {
  45. transform: rotate(90deg);
  46. }
  47. }
  48. @-webkit-keyframes pacman-balls {
  49. 75% {
  50. opacity: 0.7;
  51. }
  52. 100% {
  53. transform: translate(-100px, -6.25px);
  54. }
  55. }
  56. @keyframes pacman-balls {
  57. 75% {
  58. opacity: 0.7;
  59. }
  60. 100% {
  61. transform: translate(-100px, -6.25px);
  62. }
  63. }
  64. .pacman {
  65. position: relative;
  66. }
  67. .pacman > div:nth-child(2) {
  68. -webkit-animation: pacman-balls 1s -0.99s infinite linear;
  69. animation: pacman-balls 1s -0.99s infinite linear;
  70. }
  71. .pacman > div:nth-child(3) {
  72. -webkit-animation: pacman-balls 1s -0.66s infinite linear;
  73. animation: pacman-balls 1s -0.66s infinite linear;
  74. }
  75. .pacman > div:nth-child(4) {
  76. -webkit-animation: pacman-balls 1s -0.33s infinite linear;
  77. animation: pacman-balls 1s -0.33s infinite linear;
  78. }
  79. .pacman > div:nth-child(5) {
  80. -webkit-animation: pacman-balls 1s 0s infinite linear;
  81. animation: pacman-balls 1s 0s infinite linear;
  82. }
  83. .pacman > div:first-of-type {
  84. width: 0px;
  85. height: 0px;
  86. border-right: 25px solid transparent;
  87. border-top: 25px solid #b8c2cc;
  88. border-left: 25px solid #b8c2cc;
  89. border-bottom: 25px solid #b8c2cc;
  90. border-radius: 25px;
  91. -webkit-animation: rotate_pacman_half_up 0.5s 0s infinite;
  92. animation: rotate_pacman_half_up 0.5s 0s infinite;
  93. position: relative;
  94. left: -30px;
  95. }
  96. .pacman > div:nth-child(2) {
  97. width: 0px;
  98. height: 0px;
  99. border-right: 25px solid transparent;
  100. border-top: 25px solid #b8c2cc;
  101. border-left: 25px solid #b8c2cc;
  102. border-bottom: 25px solid #b8c2cc;
  103. border-radius: 25px;
  104. -webkit-animation: rotate_pacman_half_down 0.5s 0s infinite;
  105. animation: rotate_pacman_half_down 0.5s 0s infinite;
  106. margin-top: -50px;
  107. position: relative;
  108. left: -30px;
  109. }
  110. .pacman > div:nth-child(3),
  111. .pacman > div:nth-child(4),
  112. .pacman > div:nth-child(5),
  113. .pacman > div:nth-child(6) {
  114. background-color: #b8c2cc;
  115. width: 15px;
  116. height: 15px;
  117. border-radius: 100%;
  118. margin: 2px;
  119. width: 10px;
  120. height: 10px;
  121. position: absolute;
  122. transform: translate(0, -6.25px);
  123. top: 25px;
  124. left: 70px;
  125. }