Advertisement
ruesha

float text (hovers over container)

Jul 4th, 2021
2,640
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 1 0
  1. <style>
  2. #float {
  3. text-shadow: -1px 0 #000, 0 1px #000, 1px 0 #000, 0 -1px #000, 0 0;
  4. font-style: italic;
  5. font-size: 3em;
  6. font-weight: bold;
  7. color: #fff;
  8. position: absolute;
  9. left: 0;
  10. width: 100%;
  11. top: 4.5em;
  12. z-index: 1000;
  13. animation-name: floating;
  14. animation-duration: 3s;
  15. animation-iteration-count: infinite;
  16. animation-timing-function: ease-in-out;
  17. }
  18.  
  19. @keyframes floating {
  20. 0% { transform: translate(0, 0px); }
  21. 50% { transform: translate(0, 3px); }
  22. 100% { transform: translate(0, -0px); }
  23. }
  24.  
  25. </style>
  26. <div id="float">ruesha!</div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement