dianakko

slide in out left right animations

Oct 21st, 2021
307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. <style>
  2. #slidein {
  3. animation: slide 1s ease;
  4. }
  5. #slidefromright {
  6. animation: slideright 1s ease;
  7. }
  8. #rotate2 {
  9. animation: bigate 1s ease;
  10. transform-origin: center;
  11. width: fit-content;
  12. }
  13. #rotate1 {
  14. animation: smallrotate 1s ease;
  15. transform-origin: center;
  16. width: fit-content;
  17. }
  18. #blur {
  19. animation: blur 1s ease;
  20. }
  21. @keyframes slide {
  22. from {
  23. transform: translateX(-5em);
  24. }
  25. to {
  26. transform: translateX(0);
  27. }
  28. }
  29. @keyframes slideright {
  30. from {
  31. transform: translateX(5em);
  32. }
  33. to {
  34. transform: translateX(0);
  35. }
  36. }
  37. @keyframes smallrotate {
  38. from {
  39. transform: scale(.5) rotate(50deg);
  40. }
  41. to {
  42. transform: scale(1) rotate(0);
  43. }
  44. }
  45. @keyframes bigate {
  46. from {
  47. transform: scale(2) rotate(-50deg);
  48. }
  49. to {
  50. transform: scale(1) rotate(0);
  51. }
  52. }
  53. @keyframes blur {
  54. from {
  55. filter: blur(50px);
  56. }
  57. to {
  58. filter: blur(0);
  59. }
  60. }
  61. </style>
  62. <div id="slidein">
  63. You would change "#slidein" or any of the other IDs I have given to "#text01"/"#image01"/"#container01" etc if you have pro standard.</div>
  64. <div id="slidefromright">
  65. Another example</div>
  66. <div id="rotate1">
  67. Here's another animation I like using.
  68. </div>
  69. <div id="rotate2">
  70. And another.
  71. </div>
  72. <div id="blur">BLUR</div>
Advertisement
Add Comment
Please, Sign In to add comment