纯音欣赏--月亮最知道
本帖最后由 宁静 于 2023-2-22 13:59 编辑 <br /><br /><style>#papa { margin: 120px 0 0 calc(50% - 785px); width: 1413px; height: 775px; background: #0b1a3a url('https://yinhua.ru/20221214/6IF.gif') no-repeat center/cover; box-shadow: 3px 3px 20px #000; position: relative; display: grid; place-items: center; overflow: hidden; z-index: 1; }
</style>
<div id="papa">
<audio id="aud" src="https://yinhua.ru/20221214/ylzd.mp3" loop autoplay></audio>
</div>
<script>
(function() {
(function(mkPlayer) { let defaults = { lrcAr: [], player_css: '', lrc_css: '', playerCode: ` <style> #mplayer { --color1: snow; --color2: navy; position: absolute; left: calc(50% - 60px); bottom: 10px; width: 110px; height: 110px; border-radius: 50%; background: repeating-conic-gradient(var(--color1) 0deg, var(--color2) 0.18deg); border: 6px solid var(--color1); cursor: pointer; display: grid; place-items: center center; box-shadow: 1px 2px 4px #000; } #mplayer::before { position: absolute; content: attr(data-tt); color: var(--color2); text-shadow: 1px 1px 2px var(--color1); opacity: .95; } #lrc { --motion: cover2;--tt: 2s;--state: paused; --bg: linear-gradient(180deg, hsla(220, 100%, 50%, .55), hsla(220, 100%, 50%, .55)); position: absolute; top: 180px; font: bold 2.0em 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" data-tt="0"></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 mKey = 0, coe = 0, mFlag = true;aud.addEventListener('pause', () => mState()); aud.addEventListener('playing', () => mState()); aud.addEventListener('ended', () => { mKey = 0; aud.play(); }); aud.addEventListener('timeupdate', () => { mplayer.dataset.tt = '-' + toMin(aud.duration - aud.currentTime); coe = Math.random() * 2.5; 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 = () => { let step = coe + Math.random() * coe; mplayer.style.background = `repeating-conic-gradient(var(--color1) 0deg, var(--color2) ${step}deg)`; };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 = [,
,
,
,
,
,
,
,
,
,
,
,
];
HCPlayer({
lrcAr: lrcAr,
lrc_css: '',
player_css: '--color1:#063b8e; --color2:Lavender; left:1200px; bottom:60px;',
});
})();
</script>
<br><br> 完成10个回帖{:9007:} 先去水贴回几个。最后一个在过来 最后一个必须回这里,运气就这么来的{:9001:} 纯音雅典,好听{:9022:} {:10_401:} 赞。。{:10_402:} 好宁静的夜!哈哈哈哈{:10_402:} 沉默 发表于 2023-2-3 19:05
纯音雅典,好听
很优美的纯音{:10_402:}
恋恋风尘 发表于 2023-2-3 20:42
赞。。
谢谢小风欣赏,你的才精美{:10_402:}
蜻蜓 发表于 2023-2-3 21:14
好宁静的夜!哈哈哈哈
主要纯音好听,月亮也是圆圆亮亮的{:9001:}