宁静 发表于 2023-2-8 12:12

开始说陪你到老的人现在他还在吗

本帖最后由 宁静 于 2023-2-22 13:36 编辑 <br /><br /><style>
#papa { margin: 120px 0 0 calc(50% - 770px); display: grid; place-items: center; width: 1391px; height: 770px; background: gray url('https://wj.zp68.com/lxx/yunhua/2023/02/02/2F.gif') no-repeat center/cover; overflow: hidden; user-select: none; box-shadow: 6px 3px 20px #000; position: relative; perspective: 3000px; z-index: 1; }
</style>

<div id="papa"></div>
<audio id="aud" src="https://wj.zp68.com/lxx/yunhua/2023/02/02/stt.mp3" loop autoplay></audio>

<script >
(function() {
      (function(mkPlayer) {let defaults = {lrcAr: [,],ttAr: ['花潮', '论坛', 'LRC', '在线'],lrc_css: 'top: 20px; left: 50%; transform: translateX(-50%);',player_css: 'bottom: 20px; left: calc(50% - 50px);',playerCode: `<style>#mplayer {--ww: 200px;--bg1: tan;--bg2: teal;--bg3: lightgreen;--bg4: lightblue;position: absolute;width: var(--ww);height: var(--ww);cursor: pointer;transform-style: preserve-3d;animation: rot 10s linear infinite;animation-play-state: paused;}#mplayer > span {position: absolute;width: 100%;height: 100%;display: grid;place-items: center;font: normal 1.6em sans-serif;}.front {transform: translateZ(calc(var(--ww) / 2)) rotateX(0deg);background: var(--bg1);}.top {transform: translateY(calc(var(--ww) / 2 * -1)) rotateX(90deg);background: var(--bg2);}.back {transform: translateZ(calc(var(--ww) / 2 * -1)) rotateX(180deg);background: var(--bg3);}.bottom {transform: translateY(calc(var(--ww) / 2)) rotateX(270deg);background: var(--bg4);}#btnMsg {position: absolute;color: snow;background: #129fff;top:140px;opacity: 0;border: 2px solid snow;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 { 0% { transform: rotateX(0deg); } 100% { transform: rotateX(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"><span class="front"></span><span class="bottom"></span><span class="back"></span><span class="top"></span></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;let mKey = 0,mFlag = true,fs = false,tnow = Date.now(),timerId;;data.ttAr.forEach((item, key) => {let spans = mplayer.children;spans.innerText = item;});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 geci = [,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,];
      HCPlayer({
                lrcAr: geci,
                lrc_css:`
                        --bg: linear-gradient(hsla(220, 100%, 50%, .55),hsla(220,70%,40%,.5));
                        bottom: 82%;
                     left: 15%;
                        color: snow;
                `,
                ttAr: ['','','',''],
                player_css: `
                        --ww: 260px;
                        --bg1: url('https://wj.zp68.com/lxx/yunhua/2023/02/02/001.jpg') no-repeat center/cover;
                        --bg2: url('https://wj.zp68.com/lxx/yunhua/2023/02/02/002.jpg') no-repeat center/cover;
                        --bg3: url('https://wj.zp68.com/lxx/yunhua/2023/02/02/003.jpg') no-repeat center/cover;
                        --bg4: url('https://wj.zp68.com/lxx/yunhua/2023/02/02/004.jpg') no-repeat center/cover;
                         top: 120px;
                        left: 70%;
                        color: snow;
                `,
      });
})();
</script>
<br><br><br><br>

宁静 发表于 2023-2-8 12:14

自己也是第一次听这歌

恋恋风尘 发表于 2023-2-8 13:31

漂亮,,居然还是3D旋转特效厉害

墨羽 发表于 2023-2-8 14:29

哎吆立体滴哦,旋转起来很漂亮!很浪漫的一首歌,都是故事中的好事!{:9001:}

蜻蜓 发表于 2023-2-8 14:41

那旋转的魔方好玩{:9005:}

一抹微蓝 发表于 2023-2-8 18:46

静制作真棒漂亮,转起来了转起来了,歌也好听

撒哈拉的雨 发表于 2023-2-8 21:09

这个旋转代码制作漂亮{:9022:}

撒哈拉的雨 发表于 2023-2-8 21:10

回帖还捡到东西了{:9001:}

撒哈拉的雨 发表于 2023-2-8 21:10

只能捡一次?

撒哈拉的雨 发表于 2023-2-8 21:11

好像没有了,就一次可以捡
页: [1] 2 3 4
查看完整版本: 开始说陪你到老的人现在他还在吗