vip贵宾
性别保密
威望 点
注册时间2021-7-15
最后登录1970-1-1
在线时间 小时
好友
UID53664
听众
阅读权限120
- 积分
- 19358
鲜花( 1660) 鸡蛋( 2)
|
楼主 |
发表于 2024-6-12 17:03
|
显示全部楼层
- <style>
- #tiezi { margin: 130px 0 30px calc(50% 0px); display: grid; place-items: center; width: 600px; height: 800px; background:lightblue url('https://img.wyc520.com.cn/data/attachment/forum/202404/11/133310f38is8btwiokzmb8.jpg') no-repeat center/cover; overflow: hidden; box-shadow: 3px 3px 6px gray; position: relative; }
- #tiezi:hover .vid { opacity: .07; }
- #mplayer { position: absolute; bottom:10px; width: fit-content; height: fit-content; display: flex;flex-direction: column;align-items: center; gap: 8px; z-index: 9; }
- #btnwrap { position: relative;width: 100px; height: 100px; display: grid; place-items: center; border-radius:50%;border: solid 0px Cyan; background: #ccc linear-gradient(to top right, rgba(255,0,0,1.0), rgba(255,0,0,.65)); background: url('https://wyc520.com.cn/uc_server/avatar.php?uid=53395&size=big') no-repeat center/cover; cursor: pointer;object-fit: cover;mix-blend-mode:screen;box-shadow: 3px 3px 1px gray ; animation: rot 5s linear infinite alternate ; }
- #btnwrap:hover {border-radius: 50%;border: solid 0px Cyan;background: #000 linear-gradient(to top right, rgba(255,0,0,1), rgba(255,0,0,.65)); background: url('https://wyc520.com.cn/uc_server/avatar.php?uid=53395&size=big') no-repeat center/cover; transition: 5s; object-fit: cover;mix-blend-mode:screen; box-shadow: 3px 3px 18px Cyan ; animation: rot 5s linear infinite alternate; }
- #btnplay {position: absolute;width: 48px; height: 48px; background: url('https://img.wyc520.com.cn/data/attachment/forum/202406/12/101333wb2ep2zvmpmm9d2t.png') no-repeat left top;filter: hue-rotate(360deg);}
- #btnpause {position: absolute;width: 48px; height: 48px; background: url('https://img.wyc520.com.cn/data/attachment/forum/202406/12/101333wb2ep2zvmpmm9d2t.png') no-repeat right top; filter: hue-rotate(0deg); }
- #prog {width:300px; height: 2px;background: #cccccc59 linear-gradient(to right,snow,snow,snow) no-repeat; background-size: 1px 2px; cursor: pointer; position: relative;}
- #prog::before { position: absolute;content: ''; top: -7px; width: inherit;height: 15px; }
- #prog:hover::before { background: rgba(0,200,200,.15); }
- #tmsg { font: normal 16px sans-serif; color: snow;}
- .vid { position: absolute; bottom: 0; width: 100%; height: calc(100% + 80px); object-fit: cover; transition: 5s; pointer-events: none; opacity: .27; }
- @keyframes rot { to { transform: rotate(360deg); } }
- </style>
- <div id="tiezi">
- <div id="mplayer">
- <span id="btnwrap"><span id="btnplay" style="display: none;"></span><span id="btnpause" style="display: block;"></span></span><span id="prog" style="background-size: 80.4333px 2px;"></span><span id="tmsg">04:29 | 00:43</span>
- </div>
- <video class="vid" src="https://st0.dancf.com/gaoding/gaoding/111f1aa5-63e5-456b-8b78-502103f08caa51052311.mp*4" muted="muted" autoplay="autoplay" loop="loop"></video>
- </div>
- <script>
- let aud = new Audio();
- aud.src = 'https://music.163.com/song/media/outer/url?id=1342795329&auto.mp3';
- aud.autoplay = true;aud.loop = true;
- btnwrap.onclick = () => aud.paused ? aud.play() : aud.pause();
- prog.onclick = (e) => aud.currentTime = aud.duration * e.offsetX / prog.offsetWidth;
- aud.addEventListener('pause', () => btnstate());
- aud.addEventListener('play',() => btnstate());
- aud.addEventListener('timeupdate', () => {prog.style.backgroundSize = prog.offsetWidth * aud.currentTime / aud.duration + 'px 2px';
- tmsg.innerText = toMin(aud.duration) + ' | ' + toMin(aud.currentTime);
- for(j=0; j<lrcAr.length; j++) {if(aud.currentTime >= lrcAr[j][0]) lrc.innerText = lrcAr[j][1];}});
- let btnstate = () => aud.paused ? (btnplay.style.display = 'block', btnpause.style.display = 'none') : (btnplay.style.display = 'none', btnpause.style.display = 'block');
- let toMin = (val) => {if (!val) return '00:00';val = Math.floor(val);
- let min = parseInt(val / 60), sec = parseFloat(val % 60);
- if(min < 10) min = '0' + min; if(sec < 10) sec = '0' + sec; return min + ':' + sec;}
- </script>
复制代码 |
鲜花鸡蛋隐身药水 在2024-6-12 17:48 送朵鲜花 并说:我非常同意你的观点,送朵鲜花鼓励一下
|