你若花开 (DJheap九天版)
<style>#papa { margin: 0 0 0 calc(50% - 593px); display: grid; place-items: center; width: 1200px; height: 720px; background: gray url('https://pic.imgdb.cn/item/63dfb4b44757feff33becef7.gif') no-repeat center/cover; overflow: hidden; user-select: none; box-shadow: 6px 3px 20px #000; position: relative; perspective: 3000px; z-index: 1; }
#papa::before { position: absolute;content: ''; bottom: 0px; width: 1100px; height: 680px; background: url('https://bbs.cnzv.cc/pan/qun91530683/2023/02/02/764341b88548cf9fb2a815a8c744ebc0.gif') no-repeat center/cover; border-radius: 100%; transform-style: preserve-3d; transform: rotateY(180deg) rotateZ(-0deg); pointer-events: none; box-shadow: 0px 0px 0px #222; }
#btnMsg { position: absolute; color: snow; background: green; opacity: 0; border: 2px solid snow; border-radius: 8px; padding: 4px;
transition: all .55s; cursor: pointer; z-index: 1001; }
</style>
<div id="papa"></div>
<audio id="aud" src="https://www.joy127.com/url/118706.mp3" loop autoplay></audio>
<script >
(function() {
(function(mkPlayer) {let defaults = {lrcAr: [,],ttAr: ['花潮', '论坛', 'LRC', '在线','HCP','Player'],lrc_css: 'top: 20px; left: 50%; transform: translateX(-50%);',player_css: 'bottom: 20px; left: calc(50% - 50px);',playerCode: `<style>#mplayer {--bg: linear-gradient(-20deg,lightblue,blue);position: absolute;width: 200px;height: 200px;cursor: pointer;filter: drop-shadow(10px 10px 20px hsla(0,0%,0%,.75));animation: rot 10s infinite linear;animation-play-state: paused;}#mplayer > span {position: absolute;width: 50%;height: 50%;border-radius: 0 100%;background: var(--bg);transform-origin: 98% 98%;}#btnMsg {--btnColor: white;--btnBg: #0089f0;position: absolute;color: var(--btnColor);background: var(--btnBg);opacity: 0;border: 2px solid var(--btnColor);border-radius: 8px;padding: 4px;transition: all .75s;cursor: pointer;z-index: 901;}#lrc {--motion: cover2;--tt: 1s;--state: running;--bg: linear-gradient(180deg, hsla(100, 10%, 50%, .75), hsla(100, 100%, 20%, .65));position: absolute;font: bold 2.4em sans-serif;color: hsl(100, 100%, 90%);white-space: pre;-webkit-background-clip: text;filter: drop-shadow(1px 1px 2px hsla(0, 100%, 0%, .85));z-index: 900;}#lrc::before {position: absolute;content: attr(data-lrc);width: 20%;height: 100%;color: transparent;overflow: hidden;white-space: pre;background: var(--bg);filter: inherit;-webkit-background-clip: text;animation: var(--motion) var(--tt) linear forwards;animation-play-state: var(--state);}@keyframes rot { to {transform: rotate(360deg); } }@keyframes cover1 { from { width: 0; } to { width: 100%; } }@keyframes cover2 { from { width: 0; } to { width: 100%; } }</style><div id="lrc"data-lrc="HCPlayer">HCPlayer</div><div id="mplayer"></div><span id="btnMsg">全屏观赏</span>`,};let playCode = (user_config) => {let data = Object.assign({}, defaults, user_config);papa.innerHTML += data.playerCode;mplayer.style.cssText += data.player_css;lrc.style.cssText += data.lrc_css;btnMsg.style.cssText += data.btn_css;let mKey = 0,mFlag = true,fs = false,tnow = Date.now(),timerId;let total = data.total || 5;Array.from({length:total}).forEach( (el,k) => {el = document.createElement('span');el.style.transform = `rotate(${360/total*k}deg)`;mplayer.appendChild(el);});mplayer.onclick = () => aud.paused ? aud.play() : aud.pause();btnMsg.onclick = () => fs ? document.exitFullscreen() : papa.requestFullscreen();papa.onmousemove = (e) => {clearTimeout(timerId);btnMsg.style.opacity = '.95';timerId = setTimeout('btnMsg.style.opacity = "0"', 3000);};document.addEventListener("fullscreenchange", () => {if (document.fullscreenElement !== null) {fs = true;btnMsg.innerText = '退出全屏';} else {fs = false;btnMsg.innerText = '全屏观赏';}});aud.addEventListener('pause', () => mState());aud.addEventListener('play', () => mState());aud.addEventListener('seeked', () => calcKey());let mState = () => aud.paused ? (lrc.style.setProperty('--state', 'paused'), mplayer.style.animationPlayState = 'paused') : (lrc.style.setProperty('--state', 'running'), mplayer.style.animationPlayState = 'running');aud.addEventListener('timeupdate', () => {for (j = 0; j < data.lrcAr.length; j++) {if (aud.currentTime >= data.lrcAr) {if (mKey === j) showLrc(data.lrcAr);else continue;}}});let showLrc = (time) => {let name = mFlag ? 'cover1' : 'cover2';lrc.innerHTML = data.lrcAr;lrc.dataset.lrc = data.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 < data.lrcAr.length; j++) {if (aud.currentTime <= data.lrcAr) {mKey = j - 1;break;}}if (mKey < 0) mKey = 0;if (mKey > data.lrcAr.length - 1) mKey = data.lrcAr.length - 1;let time = data.lrcAr - (aud.currentTime - data.lrcAr);showLrc(time);};};mkPlayer.HCPlayer = playCode;})(this);
let lrcAr = [
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
];
HCPlayer({
lrcAr: lrcAr,
lrc_css:`
--bg: linear-gradient(hsla(180,55%,40%,.15),hsla(200,90%,45%,.7));
bottom: 10px;
left: 20px;
color: snow;
`,
player_css: `
--bg: linear-gradient(-95deg,lightgreen,green);
width: 80px;
height: 80px;
bottom: 10px;
right: 50px;
filter: drop-shadow(3px 5px 0 yellow) drop-shadow(-3px -3px 0 gold);
`,
btn_css: '--btnColor: yellow; --btnBg: lightgreen; top: 20px; left: 20px;',
total:8,
});
})();
</script>
挺新的歌曲,谢谢醉美管理员精彩分享:) klxf 发表于 2024-12-19 23:15
挺新的歌曲,谢谢醉美管理员精彩分享
不是新歌,是2023年的歌曲了! 醉美水芙蓉 发表于 2024-12-20 17:13
不是新歌,是2023年的歌曲了!
之前没听过,挺好听呢:)
页:
[1]