醉美水芙蓉 发表于 2026-3-14 17:59:43

蓝莲花

<meta charset="utf-8">
<style>
#papa { margin: 0px 0 0px calc(50% - 718px); width: 1300px; height: 720px; background: lightblue url('https://upfile.mp3.wf/view.php/abca62cd41138efbe4b11ad421c1a772.gif') no-repeat center/cover; box-shadow: 0px 0px 0px #000; position: relative; display: grid; place-items: center; overflow: hidden; z-index: 1; }
#papa::before { position: absolute; content: '';background: url('https://wj.zp68.com/lxx/yunhua/2022/12/11/1IF.gi') no-repeat center/cover; opacity: .65; width: 100%; height: 100%; animation: scale 8s infinite alternate linear; }
.mLine:nth-of-type(odd) { background: linear-gradient(to top,green,DarkCyan); }
.mLine::before { position: absolute; content: ''; width: 100%; height:6px; border-radius: 50%; background: lightblue; top: 0; animation: up 1.2s infinite alternate linear; }
@keyframes up{ to {top: -40px; } }
@keyframes scale { to {transform: scale(1.2); } }
</style>

<div id="papa"></div>
<audio id="aud" src="https://www.joy127.com/url/146053.mp3" loop autoplay></audio>

<script>
(function() {
        (function(mkPlayer) {let defaults = {lrcAr: [],ypData: new Array(500).fill(0).map((v, k) => Math.floor(Math.random() * 200) + 10),pinpu: {size: 4, gap: 2,},player_css: '',lrc_css: '',playerCode: `<style>#mplayer {--ww: 300px;--hh: 140px; --color1: darkgreen; --color2: snow);position: absolute;bottom: 10px;width: var(--ww);height: var(--hh);display: flex;justify-content: center;align-items: flex-end;cursor: pointer;}.mLine {position: relative;margin: 0 1px 0 1px;width: 4px;height: 8px;background: linear-gradient(to top,var(--color1),var(--color2));transition: .35s;opacity: .95;}#lrc {--motion: cover2;--tt: 2s;--state: paused;--bg: linear-gradient(180deg, hsla(120, 50%, 50%, .45), hsla(120, 100%, 50%, .75));position: absolute;top: 80px;font: bold 2.2em sans-serif;color: hsl(0, 10%, 90%);white-space: pre;-webkit-background-clip: text;filter: drop-shadow(1px 1px 2px 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: 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%;}}</style><div id="mplayer"></div><div id="lrc" data-lrc="HCPlayer">HCPlayer</div>`,};let playCode = (user_config) => {let data = Object.assign({}, defaults, user_config);papa.innerHTML += data.playerCode;mplayer.style.cssText += data.player_css;mplayer.onclick = () => aud.paused ? aud.play() : aud.pause();aud.loop = false;let ppsize = data.pinpu.size || 4, gap = data.pinpu.gap || 2;let total = Math.ceil(mplayer.offsetWidth / (ppsize + gap));let mKey = 0,ppnum = 0, mFlag = true;for (j = 0; j < total; j++) {let el = document.createElement('span');el.className = 'mLine';el.style.width = ppsize + 'px';el.style.marginLeft = el.style.marginRight = gap/2 + 'px';mplayer.appendChild(el);}let lines = document.querySelectorAll('.mLine');let max = Math.max.apply(null, data.ypData);let divide = max / mplayer.offsetHeight, coe = 20 / total / 2, plus;aud.addEventListener('pause', () => mState());aud.addEventListener('playing', () => { mState(); update(); });aud.addEventListener('ended', () => { mKey = 0; ppnum = 0; aud.play(); });aud.addEventListener('timeupdate', () => {ppnum++;if (ppnum >= data.ypData.length) ppnum = 0;update();for (j = 0; j < data.lrcAr.length; j++) {if (aud.currentTime >= data.lrcAr) {cKey = j;if (mKey === j) showLrc(data.lrcAr);else continue;}}});let update = () => lines.forEach((item, key) => {plus = (key < total / 2 ? key : total - key) * coe * 10;item.style.setProperty('height', Math.random() * (data.ypData - 30) / divide + plus + 'px');});let mState = () => aud.paused ? lrc.style.setProperty('--state', 'paused') : lrc.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;};};mkPlayer.HCPlayer = playCode;})(this);
        let lrcAr = [
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
       
];
        ypData = ;
        HCPlayer({
                lrcAr: lrcAr,
                ypData: ypData,
                lrc_css: 'left: 38%; bottom: 20px;color: lightblue; --bg: linear-gradient(rgba(255,5,10,.75),rgba(255,50,10,.95));',
            player_css: 'right: 39.8%; bottom: 50px; --len: 3.2px;--color: #eee; ',       
                player_css: '--ww: 100%; --hh: 240px; --color1: SkyBlue; --color2: Yellow; bottom: 0;',
                pinpu: {size: 6,gap: 2},
        });
})();
</script>

klxf 发表于 2026-3-15 12:03:23

制作精美,效果惊艳,谢谢分享

醉美水芙蓉 发表于 2026-3-15 15:41:07

klxf 发表于 2026-3-15 12:03
制作精美,效果惊艳,谢谢分享

谢谢友友支持!

llz123 发表于 2026-3-17 13:54:21

欣赏美芙蓉美贴,制作漂亮,歌曲生动,点赞!

醉美水芙蓉 发表于 2026-3-17 21:50:11

llz123 发表于 2026-3-17 13:54
欣赏美芙蓉美贴,制作漂亮,歌曲生动,点赞!

谢谢老师光临支持!

快播 发表于 2026-3-19 09:37:04

赞,顶帖内容引人深思

posunbianxing 发表于 2026-3-24 00:41:04

赞,顶帖超有指导价值啦

wuwuqiwu 发表于 2026-3-24 12:39:23

赞,顶帖角度十分巧妙

1643091610 发表于 2026-3-25 21:57:04

感谢分享,充满生活情趣

qianfuqi 发表于 2026-3-27 04:25:27

感谢分享,增长生活经验
页: [1] 2
查看完整版本: 蓝莲花