Advertisement
Guest User

image circle music player

a guest
Dec 29th, 2024
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>Music Player</title>
  7. <style>
  8. #music-player {
  9. display: flex;
  10. align-items: center;
  11. justify-content: center;
  12. }
  13. #music-player {
  14. height: 1.425em;
  15. width: 1.425em;
  16. font-size: 1.5em;
  17. padding: 0.125em;
  18. border-radius: 50%;
  19. border: 3px dotted #ADE096;
  20. background: #FFB3C7;
  21. position: relative;
  22. bottom: -1em;
  23. right: 0em;
  24. z-index: 1200;
  25. -webkit-animation: spin 2s linear infinite;
  26. -webkit-animation: spin 4s linear infinite;
  27. -moz-animation: spin 4s linear infinite;
  28. animation: spin 4s linear infinite;
  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);
  43. transform: rotate(360deg);
  44. }
  45. }
  46. #music-player:hover {
  47. -webkit-animation: pop 0.3s ease;
  48. }
  49. </style>
  50. </head>
  51. <body>
  52. <div id="music-player">
  53. <img src="https://64.media.tumblr.com/tumblr_lkl5htNQtn1qfamg6.gif">
  54. </div>
  55. <audio id="audio" src="https://dl.dropbox.com/s/s8caa4op3ksf7v0/%C3%81ngel%20%28Once%20in%20Your%20Lifetime%29.mp3"></audio>
  56. <script>
  57. document.getElementById("music-player").onclick = function() {
  58. var audio = document.getElementById("audio");
  59. if (audio.paused) audio.play();
  60. else audio.pause();
  61. };
  62. </script>
  63. </body>
  64. </html>
  65.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement