Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. /*
  2. Animation timing functions
  3. * ease: Slow start, then fast, then end slowly (default)
  4. * linear: The same speed from start to end
  5. * ease-in: With a slow start
  6. * ease-out: With a slow end
  7. * ease-in-out: With a slow start and end
  8. * cubic-bezier(n,n,n,n): Lets you define your own values in a cubic-bezier function
  9. */
  10.  
  11. .myDiv1{
  12.  
  13. /* [name] [duration] [timing function] [delay] [repeate count e.g. 1 or infinite] [reverse with alternate] */
  14. animation: anim-1 5s ease-in-out 2s 5 alternate-reverse;
  15.  
  16. background-color: black;
  17. height: 100px;
  18. width: 100px;
  19. position: relative;
  20. }
  21.  
  22. .myDiv2 {
  23. animation-name: anim-2;
  24. animation-delay: 1s;
  25. animation-duration: 3s;
  26. animation-iteration-count: 5;
  27. animation-direction: reverse;
  28. animation-timing-function: linear;
  29.  
  30. position: absolute;
  31. background-color: green;
  32. top: 110px;
  33. height: 50px;
  34. width: 50px;
  35. }
  36.  
  37. @keyFrames anim-1 {
  38. 0% {
  39. background-color: red;
  40. top:0px;
  41. left:0px;
  42. }
  43. 50% {
  44. background-color: yellow;
  45. }
  46. 100% {
  47. background-color: blue;
  48. top: 30px;
  49. left: 200px;
  50. }
  51. }
  52.  
  53. @keyFrames anim-2 {
  54. from {width: 0px;}
  55. to {width: 150px;}
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement