Advertisement
ruesha

music player 8/22

Aug 22nd, 2024
339
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 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. #music-player {
  12. height: 1.7em;
  13. width: 1.7em;
  14. font-size: 1.5em;
  15. padding: 7px;
  16. border-radius: 50%;
  17. border: 1px solid #f5dae7;
  18. background: rgba(43,44,65,0.9);
  19. position: absolute;
  20. left: 290px;
  21. top: -10px;
  22. z-index: 40;
  23. -webkit-animation: spin 2s linear infinite;
  24. -webkit-animation:spin 4s linear infinite;
  25. -moz-animation:spin 4s linear infinite; animation:spin 4s linear infinite;
  26. }
  27. @-moz-keyframes spin {
  28. 100% {
  29. -moz-transform: rotate(360deg);
  30. }
  31.  
  32. } @-webkit-keyframes spin {
  33. 100% {
  34. -webkit-transform: rotate(360deg);
  35. }
  36. }
  37. @keyframes spin {
  38. 100% {
  39. -webkit-transform: rotate(360deg);
  40. transform:rotate(360deg);
  41. }
  42. }
  43. #music-player:hover {
  44. -webkit-animation: pop 0.3s ease;
  45. }
  46. </style>
  47.  
  48. <div id="music-player"><i class="fa-solid fa-headphones"style="font-size:0.8em; color:#fff;-webkit-text-stroke: 0.5px #e0b8ff;"></i></div>
  49. <audio id="audio" src="https://dl.dropbox.com/s/l2impfql42ku4fu/iz%20one%20dreamlike.mp3?dl=0"></audio>
  50.  
  51. <script>
  52. document.getElementById("music-player").onclick = function() {
  53. var audio = document.getElementById("audio");
  54. if (audio.paused) audio.play();
  55. else audio.pause();
  56. };
  57. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement