Advertisement
kyujouz

separate floating image code

May 7th, 2022
6,230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. <style>
  2. #float {
  3. animation-name: floating;
  4. animation-duration: 3s;
  5. animation-iteration-count: infinite;
  6. animation-timing-function: ease-in-out;
  7. }
  8.  
  9. @keyframes floating {
  10. 0% { transform: translate(0, 0px); }
  11. 50% { transform: translate(0, 15px); }
  12. 100% { transform: translate(0, -0px); }
  13. }
  14.  
  15. </style>
  16. <div id="float"><img src="your link here"></div>
  17. alternatively you can just change #float to your image's element id! (like #image01)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement