Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <head>
- <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.14.0/css/all.css" integrity="sha384-HzLeBuhoNPvSl5KYnjx0BT+WB0QEEqLprO+NBkkk5gbc67FTaL7XIGa2w1L0Xbgc" crossorigin="anonymous">
- </head>
- <style>
- img:hover {
- filter: saturate(100%);
- }
- #musicplayer{
- display:grid;
- grid-template-columns:30px auto;
- align-items:center;
- width: 100%;
- color: #000;
- font-size:18px;
- line-height:100%;
- background: #fff;
- border: 2px solid black;
- border-radius: 5px;
- z-index: 5;
- }
- #musictitle{
- font-weight: normal;
- font-family:times;
- overflow: hidden;
- white-space: nowrap;
- display:inline-block;
- width: calc(100% - 10px - 1px);
- margin-left: 2px;
- height: 17px;
- }
- #musicpixel{
- width:105%;
- padding:5px;
- position:relative;
- min-height: 20px;
- min-width: 20px;
- }
- .overlay {
- opacity:0;
- position:absolute;
- top:0;
- left:0;
- text-align:center;
- width:100%;
- height:100%;
- transition:0.3s ease;
- }
- #musicplayer:hover .overlay {
- transition:0.3s ease;
- }
- .playpause{
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-40%, -50%);
- }
- .playpause:hover{
- cursor:help;
- }
- #musicpixel img{
- display:block;
- }
- .marquee{
- display: inline-block;
- padding-left: 100%;
- padding-right: 100%;
- animation: marquee 8s linear infinite;
- }
- @keyframes marquee{
- 0% {
- transform: translate(0, 0);
- }
- 100% {
- transform: translate(-100%, 0);
- }
- }
- </style>
- <div id='musicplayer'>
- <div id='musicpixel'>
- <img src='https://i.imgur.com/398Yet2.gif'>
- <div class='overlay'>
- <div class='playpause'><i class="fas fa-play"></i></div>
- </div>
- </div>
- <div id='musictitle'>
- <span class='marquee'> SHITODO SEITEN DAIMEIWAKU - KENSHI YONEZU </span>
- </div>
- </div>
- <audio id='musicsrc' loop src='https://cdn.discordapp.com/attachments/1071491398362214602/1130032871797686342/Sufjan_Stevens_-_Shitodo_Seiten_Daimeiwaku.mp3'></audio>
- <script>
- document.querySelector('.playpause').addEventListener('click', playpause);
- function playpause(){
- if(document.querySelector('.playpause').innerHTML == '<i class="fas fa-play"></i>'){
- document.querySelector('#musicsrc').play();
- document.querySelector('.playpause').innerHTML = '<i class="fas fa-pause"></i>';
- } else{
- document.querySelector('#musicsrc').pause();
- document.querySelector('.playpause').innerHTML = '<i class="fas fa-play"></i>';
- }
- }
- </script>
- <link rel="stylesheet" href="//code.jquery.com/ui/1.13.0/themes/base/j4r nbesheet" href="/resources/demos/style.css">
- <script src="https://code.jquery.com/jquery-3.6.0.js"></script>
- <script src="https://code.jquery.com/ui/1.13.0/jquery-ui.js"></script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement