Advertisement
dollzito

🪀 crd tuto: music player embed

Feb 2nd, 2023
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. <head>
  2. <script src="https://kit.fontawesome.com/8119dfca45.js" crossorigin="anonymous"></script></head>
  3.  
  4. <style>
  5. #music-player {
  6. display: flex;
  7. align-items: center;
  8. justify-content: center;
  9. }
  10.  
  11. #music-player {
  12. height: 1.425em;
  13. width: 1.425em;
  14. font-size: 1.5em;
  15. padding: 0.125em;
  16. border-radius: 50%;
  17. border: 1px solid #FFFFFF;
  18. background: rgb(255,255,255);
  19. background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(255,209,235,1) 100%);
  20. -webkit-filter: drop-shadow(0px 0px 1.5px #FF95CD);
  21. position: absolute;
  22. bottom: 0.5em;
  23. left: 0.5em;
  24. -webkit-animation: spin 2s linear infinite;
  25. -webkit-animation: spin 4s linear infinite;
  26. -moz-animation: spin 4s linear infinite;
  27. animation: spin 4s linear infinite;
  28. }
  29.  
  30. @-moz-keyframes spin {
  31. 100% {
  32. -moz-transform: rotate(360deg);
  33. }
  34.  
  35. } @-webkit-keyframes spin {
  36. 100% {
  37. -webkit-transform: rotate(360deg);
  38. }
  39. }
  40. @keyframes spin {
  41. 100% {
  42. -webkit-transform: rotate(360deg); 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="fas fa-headphones"style="font-size: .7em;color: #FFFFFF;-webkit-text-stroke: 0.5px #FFD1EB;"></i></div><audio id="audio" src="https://cdn.discordapp.com/attachments/925397547990798380/1064539887124099173/Baby_Blues.mp3"></audio>
  51.  
  52. <script>
  53. document.getElementById("music-player").onclick = function() {
  54. var audio = document.getElementById("audio");
  55. if (audio.paused) audio.play();
  56. else audio.pause();
  57. };
  58. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement