Guest User

Untitled

a guest
Nov 18th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. /**
  2. * Move in a circle without wrapper elements
  3. * Idea by Aryeh Gregor, simplified by Lea Verou
  4. */
  5.  
  6. @keyframes rot {
  7. from {
  8. transform: rotate(0deg)
  9. translate(-150px)
  10. rotate(0deg);
  11. color: red;
  12. }
  13. to {
  14. transform: rotate(360deg)
  15. translate(-150px)
  16. rotate(-360deg);
  17. color: blue;
  18. }
  19. }
  20.  
  21. .carousel {
  22. border: 1px dashed black;
  23. width: 90%;
  24. line-height: 90%;
  25. }
  26.  
  27. .carousel > div {
  28. width: 100px;
  29. height: 100px;
  30. font-size: 100px;
  31. display: inline-block;
  32. position: absolute;
  33. top: 150px;
  34. margin: -20px;
  35. }
  36.  
  37. .smile1 {
  38. left: 50%;
  39. animation: 3s rot infinite linear;
  40.  
  41. }
  42. .smile2 {
  43. left: 40%;
  44. animation: 2s rot infinite linear;
  45.  
  46. }
Add Comment
Please, Sign In to add comment