宁静 发表于 2023-3-4 19:31

灰姑娘:TO:蜻蜓贺芳辰

本帖最后由 宁静 于 2023-3-4 19:33 编辑 <br /><br /><style>
#papa { margin: 120px 0 0 calc(50% - 533px); display: grid; place-items: center; width: 1024px; height: 640px; background: url('https://wj.zp68.com/lxx/yunhua/2023/01/23/GIF.gif') no-repeat center/cover; background-blend-mode: normal, color; box-shadow: 3px 3px 20px #000; user-select: none; position: relative; perspective: 3000px; z-index: 1; }
#papa::before { position: absolute; content: url('https://365.tf/disk/tf/1677943585.gif'); right: 25px; top: 10%; mix-blend-mode: }
</style>

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

<script >
(function() {
        (function(mkPlayer) {let defaults = {lrcAr: [ ],lrc_css: 'top: 20px; left: 50%; transform: translateX(-50%);',player_css: 'bottom: 20px; left: calc(50% - var(--ww) / 2);', total: 20,playerCode: `<style>#mplayer {--ww: 200px;--bg: linear-gradient(180deg,gold,lightblue,yellow);--bc: #000;position: absolute;width: var(--ww);height: var(--ww);display: grid;place-items: center;transform: rotateZ(15deg);transform-style: preserve-3d;animation: rot 10s infinite linear;cursor: pointer;}.mline {width: var(--ww);height: var(--ww);border-radius: 50%;border: 1px dotted var(--bc);background: var(--bg);position: absolute;opacity: .75;}#btnMsg { position: absolute; color: snow; background: Blue; 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 cover1 { from { width: 0; }to { width: 100%; } }@keyframes cover2 { from { width: 0; } to { width: 100%; } }@keyframes rot { to { transform: rotateZ(15deg) rotateY(1turn); } }</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, msize = mplayer.offsetWidth, tnow = Date.now(), timerId;;[...Array(data.total).keys()].forEach( (item,key) => {item = document.createElement('span');item.className = 'mline';item.style.transform= `rotateX(${360/data.total*key}deg) rotateY(${360/data.total*key}deg)`;mplayer.appendChild(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;mplayer.style.setProperty('--ww', msize*1.5 + 'px');btnMsg.innerText = '退出全屏';} else {fs = false;mplayer.style.setProperty('--ww', msize + 'px');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(blue,lightblue); top: 55px; left: 250px;',
                player_css: '--ww: 160px; --bg: linear-gradient(45deg,orange,red,snow,yellow); --bc: blue; top: 50px; right: 850px;',
                total: 20,
        });
})();
</script>
<br><br><br><br><br>

宁静 发表于 2023-3-4 19:34

@蜻蜓

生日快乐!

宁静 发表于 2023-3-4 19:36

本来沉默说送你喜欢的你莫走,我感觉这个动画特别漂亮就送这首歌曲了,

宁静 发表于 2023-3-4 19:36

点击画面中的全屏欣赏。效果更加漂亮

宁静 发表于 2023-3-4 19:37

手机欣赏点击播放器---大圆球

沉默 发表于 2023-3-4 19:43

沉默唱的就是好听{:9022:}

沉默 发表于 2023-3-4 19:44

蜻蜓美女生日快乐!有生的日子快快乐乐{:9001:}

沉默 发表于 2023-3-4 19:45

宁静 发表于 2023-3-4 19:36
本来沉默说送你喜欢的你莫走,我感觉这个动画特别漂亮就送这首歌曲了,

都一样,凡是沉默唱的就可以{:9007:}

宁静 发表于 2023-3-4 19:48

沉默 发表于 2023-3-4 19:43
沉默唱的就是好听


{:9001:}

要别人说你好听才好听

沉默 发表于 2023-3-4 19:49

宁静 发表于 2023-3-4 19:48
要别人说你好听才好听

我感觉好听就好听{:9005:}
页: [1] 2 3 4
查看完整版本: 灰姑娘:TO:蜻蜓贺芳辰