醉美水芙蓉 发表于 2023-9-10 18:55:55

人间走一趟拼的是健康

本帖最后由 醉美水芙蓉 于 2023-9-10 19:18 编辑 <br /><br /> <style>
#papa { margin: -40px 0 0 calc(50% - 493px); width: 1024px; height: 640px; background: gray url('https://img-baofun.zhhainiao.com/pcwallpaper_ugc/live/8e63bf24eea9dfc2c31ad9be0607ceb6.mp4.jpg') no-repeat center/cover; box-shadow: 3px 3px 20px #000; position: relative; display: grid; place-items: center; perspective: 1200px;z-index: 1; }
#papa::after { content: ''; position: absolute; width: 100%; height: 100%; opacity: .45; background: url('https://365.tf/disk/tf/1667242630.gif');}

#pic { position: absolute; left:680px; top: 50px; width: 400px; height: 300px; mix-blend-mode: screen; -webkit-mask-image:radial-gradient(black 35%, transparent 70%); opacity: 1;}
</style>

<div id="papa">
       
<img id="pic" src="https://pic.imgdb.cn/item/63944c5bb1fccdcd3699b6d8.gif" alt="" />
</div>
<audio id="aud" src="https://www.qqmc.com/up/kwlink.php?id=255724031&.mp3" autoplay loop></audio>

<script>
(function() {
        (function(mkPlayer) {let defaults = {lrcAr: [],lrc_css: 'top: 15px; left: 50%; transform: translate(-50%)',player_css: 'bottom: 5px; left: 50%; transform: translate(-50%)',playerCode: `<style>#mplayer {--ww: 300px;--hh:100px;--state: paused;position: absolute;width: var(--ww);height: var(--hh);transform-style: preserve-3d;animation: rot3d 120s infinite linear;animation-play-state: var(--state);pointer-events: none;}.mline {position: absolute;width: 8px;height: 10px;bottom: 0;left: calc(50% - 4px);border-radius: 10px;transition: all .35s;opacity: .95;}.mline::before {position: absolute;content: '';width: 12px;height: 12px;left: calc(50% - 6px);background: var(--psecolor);border-radius: 50%;transition: all var(--ts);animation: up 1s infinite;animation-play-state: var(--state);}#btnMsg { position: absolute; color: snow; background: green; opacity: 0; border: 2px solid snow; border-radius: 8px; padding: 4px; transition: all .75s; cursor: pointer; z-index: 1001; }#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 cover1 { from { width: 0; }to { width: 100%; } }@keyframes cover2 { from { width: 0; }to { width: 100%; } }@keyframes rot3d { to { transform: rotateY(1turn); } }@keyframes up { to { top: -20px; } }</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;let mKey = 0, mFlag = true, fs = false, timerId;let total = Math.floor(mplayer.offsetWidth / 5), mRad = Math.floor(mplayer.offsetWidth / 2), tnow = Date.now();let isHover = (e,x,y,w,h) => e.offsetX > x && e.offsetX< x + w &&e.offsetY > y && e.offsetY < y + h;papa.onmousemove = (e) => {papa.style.cursor = isHover(e,mplayer.offsetLeft,mplayer.offsetTop,mplayer.offsetWidth,mplayer.offsetHeight+20) ? 'pointer' : 'default';clearTimeout(timerId);btnMsg.style.opacity = '.95';timerId = setTimeout('btnMsg.style.opacity = "0"',3000);};papa.onclick = (e) => {if(isHover(e,mplayer.offsetLeft,mplayer.offsetTop,mplayer.offsetWidth,mplayer.offsetHeight+20)) {aud.paused ? aud.play() : aud.pause();}};btnMsg.onclick = () => fs ? document.exitFullscreen() : papa.requestFullscreen();for (j = 0; j < total; j++) {let ele = document.createElement('span');ele.className = 'mline';ele.style.cssText += `background: linear-gradient(to bottom, #${Math.random().toString(16).substr(-6)}, #${Math.random().toString(16).substr(-6)});transform: rotateY(${j*360/total}deg) translateZ(${mRad}px);--psecolor: linear-gradient(135deg, #${Math.random().toString(16).substr(-6)}, #${Math.random().toString(16).substr(-6)});--ts: ${Math.random()}s;`;mplayer.appendChild(ele);}let lines = document.querySelectorAll('.mline');let update = () => {if(Date.now() - tnow > 65) {lines.forEach((item, key) => {let ph = aud.paused ? 0 : mplayer.offsetHeight;item.style.height = Math.random() * ph + 'px';});tnow = Date.now();}requestAnimationFrame(update);};update();aud.addEventListener('timeupdate', () => {for (j = 0; j < data.lrcAr.length; j++) {if (aud.currentTime >= data.lrcAr) {if (mKey === j) showLrc(data.lrcAr);else continue;}}});aud.addEventListener('pause', () => mState());aud.addEventListener('play', () => mState());aud.addEventListener('seeked', () => calcKey());document.addEventListener("fullscreenchange", () => {if(document.fullscreenElement !== null) {fs = true;btnMsg.innerText = '退出全屏';} else {fs = false;btnMsg.innerText = '全屏观赏';}});let mState = () => aud.paused ? (lrc.style.setProperty('--state', 'paused'), mplayer.style.setProperty('--state', 'paused')) : (lrc.style.setProperty('--state', 'running'), mplayer.style.setProperty('--state', 'running'));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: 'left: 25px; top: 15px; --bg: linear-gradient(180deg,hsla(120,100%,50%,.35),hsla(120,50%, 35%,.65));',
                player_css: '--ww:400px; --hh: 100px; left: 100px; bottom: 55px;',
      });

      let fs = false, timerId;
      btnMsg.style.opacity = '0';
      btnMsg.onclick = () => fs ? document.exitFullscreen() : papa.requestFullscreen();
      papa.onmousemove = () => {
                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 = '全屏观赏';
                }
      });
})();
</script>

宇神无敌 发表于 2023-9-11 20:38:00

欣赏点赞!帖很美。:hug:

醉美水芙蓉 发表于 2023-9-11 20:39:06

宇神无敌 发表于 2023-9-11 20:38
欣赏点赞!帖很美。

谢谢朋友支持!

活跃概况 发表于 2023-9-12 20:28:21

这个作品漂亮!!!!

夏艳妍 发表于 2023-9-16 08:58:15

这个作品漂亮!!!!

翁奕童苑 发表于 2023-9-20 07:11:44

这个作品漂亮!!!!

332 发表于 2023-10-6 19:33:46

这个作品漂亮!!!!

醉美水芙蓉 发表于 2023-10-6 19:34:37

332 发表于 2023-10-6 19:33
这个作品漂亮!!!!

谢谢朋友支持!

午老虎 发表于 2023-10-7 11:16:14

这个作品漂亮!!!!

醉美水芙蓉 发表于 2023-10-7 11:56:21

午老虎 发表于 2023-10-7 11:16
这个作品漂亮!!!!

谢谢老师支持!
页: [1] 2
查看完整版本: 人间走一趟拼的是健康