辫子哥哥 发表于 2022-12-12 20:42

妹妹你大胆的往前走 TO小辣椒


<style>
#papa { margin: 50px 0 0 calc(50% - 401px); width: 800px; height: 1298px; background: lightblue url('https://pic.imgdb.cn/item/63961357b1fccdcd36352184.jpg'); box-shadow: 3px 3px 20px #000; position: relative; display: grid; place-items: center; z-index: 1; }

</style>
<div id="papa"></div>
<audio id="aud" src="https://music.163.com/song/media/outer/url?id=1945963997.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: 2.5, gap: 1,},player_css: 'left: 50%; transform: translateX(-50%); /*--color1: olive; --color2: silver*/',lrc_css:'',playerCode: `<style>#mplayer {--color1: green; --color2: lightgreen;position: absolute;bottom: 60px; left: calc(50% - 60px);width: 120px; height: 120px;border-radius: 50%;border: 6px solid var(--color1);display: grid; place-items: center center;user-select: none; cursor: pointer;}#tmsg { font: normal 14px sans-serif; color: var(--color1); text-shadow: 1px 1px 1px #000; z-index: 650; }#lrc {--motion: cover2;--tt: 2s;--state: paused;--bg: linear-gradient(180deg, hsla(120, 50%, 50%, .45), hsla(120, 100%, 50%, .75));position: absolute; top: 20px;font:bold 2.4em 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);}.mLine { --hh: 0px; position: absolute; width: 2px; height: 6px; background: var(--color1); }.mLine::before, .mLine::after {position: absolute;content: '';width: 100%;height: var(--hh); }.mLine::before { bottom: 0;left: 0;background: linear-gradient(to top, var(--color1), var(--color2)); }.mLine::after { top: 0;left: 0;background: linear-gradient(to bottom, var(--color1), var(--color2)); }@keyframes cover1 {from {width: 0;} to {width: 100%;}}@keyframes cover2 {from {width: 0;} to {width: 100%;}}</style><div id="mplayer"><span id="tmsg">play</span></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;aud.loop = false;let ppsize = data.pinpu.size, gap = data.pinpu.gap;let mKey = 0, mFlag = true, ppnum = 0;let total = Math.floor(mplayer.clientWidth * Math.PI / (ppsize + gap));for(j=0; j< total; j++) {let ele = document.createElement('span');ele.className = 'mLine';ele.style.width = ppsize + 'px';ele.style.transform = `rotate(${j*360/total}deg) translateY(63px)`; mplayer.appendChild(ele);}let lines = document.querySelectorAll('.mLine');let max = Math.max.apply(null, data.ypData);let divide = max / mplayer.offsetHeight, coe = 10 / total / 2, plus;let update = () => {lines.forEach((item,key) => {plus = (key < total / 2 ? key : total - key) * coe * 5;item.style.setProperty('--hh',(Math.random() * ypData - 2) / 5 + plus + 'px');});if(!aud.paused) window.requestAnimationFrame(update);};mplayer.onclick = () => aud.paused ? aud.play() : aud.pause();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;tmsg.innerText = '-' + toMin(aud.duration - aud.currentTime);for (j = 0; j < data.lrcAr.length; j++) {if (aud.currentTime >= data.lrcAr) {cKey = j;if (mKey === j) showLrc(data.lrcAr);else continue;}}});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;};let toMin = (val) => {if (!val) return '00:00';val = Math.floor(val);let min = parseInt(val / 60),sec = parseFloat(val % 60);if (min < 10) min = '0' + min;if (sec < 10) sec = '0' + sec;return min + ':' + sec;};};mkPlayer.HCPlayer = playCode;})(this);
        let lrcAr = [
                ,
        ,
                ,
        ,
       
];

        let ypData = ;
        HCPlayer({
                lrcAr: lrcAr,
                ypData: ypData,
                lrc_css: '',
                player_css: '--color1:         Lime; --color2: #00a85f; left: 320px;',
                pinpu: {size: 1, gap: 0,},
        });
})();
</script>

<br><br><br>

辫子哥哥 发表于 2022-12-12 20:42

@小辣椒

辫子哥哥 发表于 2022-12-12 20:43

这个要谢谢小辣椒的,教了许多时间{:4_170:}

辫子哥哥 发表于 2022-12-12 20:44

现在基本有点懂了,可惜明天开始上班了,没有时间玩,最多上来看看大家的制作了

辫子哥哥 发表于 2022-12-12 20:44

{:4_205:}{:4_205:}{:4_205:}

侃大山 发表于 2022-12-12 20:54

你让人家走哪去{:5_106:}

侃大山 发表于 2022-12-12 20:55

路上那么多车,你还让妹妹往前走。

辫子哥哥 发表于 2022-12-12 20:58

侃大山 发表于 2022-12-12 20:54
你让人家走哪去

大山帅哥好{:4_187:}

辫子哥哥 发表于 2022-12-12 20:59

侃大山 发表于 2022-12-12 20:55
路上那么多车,你还让妹妹往前走。

有什么关系,看见美女人人让路,车上有驾驶员,看得见的{:4_170:}

侃大山 发表于 2022-12-12 21:00

辫子哥哥 发表于 2022-12-12 20:58
大山帅哥好

还是你帅,别拉上我,你自己负责陪妹妹大胆地往车流里走{:5_106:}

辫子哥哥 发表于 2022-12-12 21:01

侃大山 发表于 2022-12-12 21:00
还是你帅,别拉上我,你自己负责陪妹妹大胆地往车流里走

感觉你有意见{:4_203:}

侃大山 发表于 2022-12-12 21:03

辫子哥哥 发表于 2022-12-12 20:59
有什么关系,看见美女人人让路,车上有驾驶员,看得见的

这个可以有,你还挺绅士的

侃大山 发表于 2022-12-12 21:03

辫子哥哥 发表于 2022-12-12 21:01
感觉你有意见

没意见,美女都没意见,我能有什么意见啊

辫子哥哥 发表于 2022-12-12 21:05

侃大山 发表于 2022-12-12 21:03
这个可以有,你还挺绅士的

你算聪明的{:4_170:}

辫子哥哥 发表于 2022-12-12 21:05

侃大山 发表于 2022-12-12 21:03
没意见,美女都没意见,我能有什么意见啊

有意见也是无视{:4_170:}

侃大山 发表于 2022-12-12 21:11

辫子哥哥 发表于 2022-12-12 21:05
你算聪明的

没你聪明,明明让妹妹往沟里走,还说得这么好听{:4_170:}

侃大山 发表于 2022-12-12 21:11

辫子哥哥 发表于 2022-12-12 21:05
有意见也是无视

要是这样,我还不如有意见了

梦油 发表于 2022-12-12 21:17

歌好、图美、妹妹你大胆地往前走吧。

辫子哥哥 发表于 2022-12-12 21:34

侃大山 发表于 2022-12-12 21:11
没你聪明,明明让妹妹往沟里走,还说得这么好听

经验之谈{:4_170:}

辫子哥哥 发表于 2022-12-12 21:36

梦油 发表于 2022-12-12 21:17
歌好、图美、妹妹你大胆地往前走吧。

梦油要不要一起走{:4_170:}
页: [1] 2 3
查看完整版本: 妹妹你大胆的往前走 TO小辣椒