Advertisement
nomskoo

gradient circle music player

May 9th, 2022 (edited)
1,640
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. note: this is NOT my code idk whose code it is pls msg me if you know the proper credit at doiibahi on twt
  2.  
  3. <head>
  4. <script src="https://kit.fontawesome.com/8119dfca45.js" crossorigin="anonymous"></script>
  5. </head>
  6.  
  7. <style>
  8. #music-player {
  9. display: flex;
  10. align-items: center;
  11. justify-content: center;
  12. }
  13. #music-player {
  14. height: 2.15em;
  15. width: 2.15em;
  16. font-size: 1.5em;
  17. padding: 0.125em;
  18. border-radius: 50%;
  19. border: 1px solid #fff;
  20. background: rgb(255,255,255);
  21. background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(255,211,212,1) 100%);
  22. -webkit-filter: drop-shadow(0px 0px 1.5px #F6C8CA);
  23. position: absolute;
  24. top:1em;
  25. left: 1em;
  26. z-index: 40;
  27. -webkit-animation: spin 2s linear infinite;
  28. -webkit-animation:spin 4s linear infinite;
  29. -moz-animation:spin 4s linear infinite; animation:spin 4s linear infinite;
  30. }
  31. @-moz-keyframes spin {
  32. 100% {
  33. -moz-transform: rotate(360deg);
  34. }
  35.  
  36. } @-webkit-keyframes spin {
  37. 100% {
  38. -webkit-transform: rotate(360deg);
  39. }
  40. }
  41. @keyframes spin {
  42. 100% {
  43. -webkit-transform: rotate(360deg);
  44. transform:rotate(360deg);
  45. }
  46. }
  47. #music-player:hover {
  48. -webkit-animation: pop 0.3s ease;
  49. }
  50. </style>
  51.  
  52. <div id="music-player"><i class="fas fa-headphones"style="font-size:.7em; color:#fff;-webkit-text-stroke: 0.5px #ffd1eb;"></i></div>
  53. <audio id="audio" src="https://dl.dropbox.com/s/l40x6vhm86qgbea/SAME%20SAME%20%28SAME%20SAME%29.mp3?dl=0"></audio>
  54.  
  55. <script>
  56. document.getElementById("music-player").onclick = function() {
  57. var audio = document.getElementById("audio");
  58. if (audio.paused) audio.play();
  59. else audio.pause();
  60. };
  61. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement