杨千嬅、任贤齐 - 花好月圆夜 (DJ版)祝朋友们中秋节快乐
<div class="t_fsz"><table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_2005026">
<style>
#papa { margin: 80px 0 0 calc(50% - 681px); width: 1200px; height: 669px; box-shadow: 3px 3px 20px #000; position: relative; z-index: 1; display: grid;
place-items: center; background: url('https://webftp-bbs.hnol.net/yx2021//pj154/8.gif') no-repeat center/cover; overflow: hidden; }
#vid { position: absolute; width: 100%; height: 122%; top:-9%; object-fit: cover; pointer-events: none; mix-blend-mode: screen; z-index: 0; opacity: .95; }
#prog { position: absolute; bottom: 50px; width: 240px; height: 6px; border: 1px solid lightblue; border-radius: 10px;background: linear-gradient(to right,
green, red var(--prg), #eee 0); color: red; --prg: 0%; --state: paused; }
#prog::before, #prog::after { position: absolute; top: -30px; }
#prog::before { content: attr(data-cu); left: 0; }
#prog::after { right: 0; content: attr(data-du); }
#btnplay { position: absolute; top: -260px; left: calc(50% - 120px); width: 240px; height: 240px; border-radius: 50%; opacity: .75; background: url
('https://638183.freep.cn/638183/web/svg/7c-umbrella.svg') no-repeat center/cover; cursor: pointer; animation: rot 6s infinite linear var(--state); }
#lrc { --motion: cover1; --tt: 5s; --state: paused; position: absolute; left: 30%; transform: translate(-50%); top:60px; font: bold 2.0em sans-serif; color:
hsl(300, 100%, 100%); -webkit-background-clip: text; filter: drop-shadow(1px 1px 1px hsla(0, 0%, 0%, .95)); }
#lrc::before { position: absolute; content: attr(data-lrc); width: 20%; height: 100%; color: transparent; overflow: hidden; white-space: pre; background:
linear-gradient(180deg, hsla(60, 100%, 50%, .75), hsla(20, 100%, 50%, .6), hsla(60, 100%, 50%, .75)); filter: inherit; -webkit-background-clip: text;
animation: var(--motion) var(--tt) linear forwards; animation-play-state: var(--state); }
@keyframes cover1 { from { width: 0; } to { width: 100%; } }
@keyframes cover2 { from { width: 0; } to { width: 100%; } }
@keyframes rot { to { transform: rotate(-1turn); } }
</style>
<div id="papa">
<video id="vid" src="https://img.tukuppt.com/video_show/2629112/00/02/03/5b4f2ae929323.mp4" autoplay="autoplay" loop="loop" muted="muted" ></video>
<div id="lrc" data-lrc="岩新编制">岩新编制</div>
<div id="prog" data-cu="00:00" data-du="00:00" title="调节进度">
<span id="btnplay" title="播放/暂停"></span>
</div>
</div>
<audio id="aud" src="https://webftp-bbs.hnol.net/yx2021//pj154/02.swf" autoplay loop></audio>
<script>
(function() {
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;}
let vid = document.querySelector('.vid');
let mState = () => aud.paused ? (lrc.style.setProperty('--state', 'paused'),prog.style.setProperty('--state', 'paused'), vid.pause()) :
(lrc.style.setProperty('--state', 'running'),prog.style.setProperty('--state', 'running'), vid.play());
aud.addEventListener('pause', mState, false);
aud.addEventListener('play', mState, false);
aud.addEventListener('timeupdate', () => {
prog.style.setProperty('--prg', aud.currentTime / aud.duration * 100 + '%');
prog.dataset.cu = toMin(aud.currentTime);
prog.dataset.du = toMin(aud.duration);
});
let mKey = 0, mFlag = true;
let lrcAr = [
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
];
let showLrc = (time) => {let name = mFlag ? 'cover1' : 'cover2';lrc.innerHTML = lrcAr;lrc.dataset.lrc = lrcAr.replace(/<br>/,
'\n');lrc.style.setProperty('--motion', name);lrc.style.setProperty('--tt', time + 's');lrc.style.setProperty('--state', 'running');mKey += 1;mFlag = !
mFlag;};
let calcKey = () => {for (j = 0; j < lrcAr.length; j++) {if (aud.currentTime <= lrcAr) {mKey = j - 1;break;}}if (mKey < 0) mKey = 0;if (mKey >
lrcAr.length - 1) mKey = lrcAr.length - 1;let time = lrcAr - (aud.currentTime - lrcAr);showLrc(time);};
aud.addEventListener('timeupdate', () => {for(let j = 0; j < lrcAr.length; j ++) {if (aud.currentTime >= lrcAr) {if (mKey === j) showLrc(lrcAr
);else continue;}}});
aud.addEventListener('pause', () => mState());
aud.addEventListener('play', () => mState());
aud.addEventListener('seeked', () => calcKey());
btnplay.onclick = (e) => { e.stopPropagation(); aud.paused ? aud.play() : aud.pause(); }
prog.onclick = (e) => aud.currentTime = e.offsetX * aud.duration / prog.offsetWidth;
})();
setInterval( () => { aud.paused ? vid.pause() : vid.play(); },100);
</script>
</td></tr></table>
漂亮的制作。感谢新新带来的美好祝福。借帖同祝大家中秋快乐{:4_187:} 制作漂亮,同祝大家中秋快乐 预祝朋友们中秋节快乐! 发现少个播放器按钮,我是手机看的,手机要点击按钮音乐出来,这里按钮的位置点击下去,按钮是没有链接,代码位置在的,岩新最好把播放器链接加上去
页:
[1]