我们都要好好的 TO:苏三月
本帖最后由 宁静 于 2023-2-22 14:09 编辑 <br /><br /><style>#papa { margin: 120px 0 0 calc(50% - 715px); width: 1275px; height: 848px; background: lightblue url('https://pan.365.tf/uploads/lxx/20230222/sanyue.gif'); 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://pan.365.tf/uploads/lxx/20230222/sanyue.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, 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: 40px; 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(60, 50%, 50%, .45), hsla(0, 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;lrc.style.cssText += data.lrc_css;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: '--bg: #efcc90;left: 780px; top: 100px;',
player_css: '--color1: #d78156; --color2: #e49c71; left: 1020px;',
pinpu: {size: 1, gap: 0,},
});
})();
</script>
<br><br><br><br><br> @苏三月
三月好久没有看见你了,不知道你近况如何,我们都要好好的{:10_401:} 我还在恢复中,我大哥撒雨和我同一天中招的,他好的快,今天已经上班了,我还得休息一段时间。。。。。 三月多保重, 现在发现什么都是次要的,身体好才是最重要的 宁静 发表于 2023-1-3 14:28
现在发现什么都是次要的,身体好才是最重要的
终于悟出道理了{:9007:}
三月收礼开心 以前说身体是革命的本钱,现在说身体好才有自己想有的一切 还有2个回帖看看运气 其实什么运气都无所谓,,开心玩就可以