Advertisement
ruesha

spinning headphone circular

Jul 17th, 2024
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. <head>
  2. <script src="https://kit.fontawesome.com/1953b7c367.js" crossorigin="anonymous"></script>
  3. </head>
  4.  
  5. <style>
  6. #music-player {
  7. display: flex;
  8. align-items: center;
  9. justify-content: center;
  10. }
  11.  
  12. #music-player {
  13. height: 1.3em;
  14. width: 1.3em;
  15. font-size: 1.3em;
  16. padding: 0.125em;
  17. border-radius: 50%;
  18. border: 1px solid #fff;
  19. background: radial-gradient(circle farthest-corner at center center, #FFFFFF 0%, #DBE7FF 100%);
  20. -webkit-filter: drop-shadow(0px 0px 1.5px #839FD6);
  21. position: relative;
  22. left: 133px;
  23. top: 1px;
  24. z-index: 40;
  25. -webkit-animation: spin 2s linear infinite;
  26. -webkit-animation:spin 4s linear infinite;
  27. -moz-animation:spin 4s linear infinite; animation:spin 4s linear infinite;
  28. }
  29. @-moz-keyframes spin {
  30. 100% {
  31. -moz-transform: rotate(360deg);
  32. }
  33.  
  34. } @-webkit-keyframes spin {
  35. 100% {
  36. -webkit-transform: rotate(360deg);
  37. }
  38. }
  39. @keyframes spin {
  40. 100% {
  41. -webkit-transform: rotate(360deg);
  42. transform:rotate(360deg);
  43. }
  44. }
  45. #music-player:hover {
  46. -webkit-animation: pop 0.3s ease;
  47. }
  48. </style>
  49.  
  50. <div id="music-player"><i class="fa-solid fa-headphones"style="font-size:0.8em; color:#fff;-webkit-text-stroke: 0.5px #839FD6;"></i></div>
  51. <audio id="audio" src="https://dl.dropbox.com/s/34tci4v9jpvhwzw/PinkPantheress%20-%20Pain.mp3?dl=0"></audio>
  52.  
  53. <script>
  54. document.getElementById("music-player").onclick = function() {
  55. var audio = document.getElementById("audio");
  56. if (audio.paused) audio.play();
  57. else audio.pause();
  58. };
  59. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement