梅花弄弄弄--DJ音乐 TO:香染
<style>#papa { margin: 150px 0 0 calc(50% - 810px); display: grid; place-items: center; width: 1440px; height: 720px; background: url('https://wj.zp68.com/lxx/yunhua/2022/06/mhnnn.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://pic.imgdb.cn/item/64ec9ec0661c6c8e54e5bd3c.gif'); right: 15%; top: 20%; mix-blend-mode: }
</style>
<div id="papa"></div>
<audio id="aud" src="https://wj.zp68.com/lxx/yunhua/2022/06/mhnnn.mp3" loop autoplay></audio>
<script >
(function() {
(function(mkPlayer) {let defaults = {lrcAr: [ ],lrc_css: 'top: 120px; left: 20%; 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:Auqamarin; top: 650px; 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%,.6)); position: absolute; font: bold 1.8em sans-serif; color: hsl(0, 100%, 60%); white-space: pre; -webkit-background-clip: text; filter: drop-shadow(1px 1px 1px 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(Gold,Gold); top: 300px; left: 250px;',
player_css: '--ww: 50px; --bg: linear-gradient(45deg,orange,red,Yellow,yellow); --bc: blue; top: 160px; left: 170px;',
total: 20,
});
})();
</script>
<br><br> @香染
美妞送个热烈一点的音乐{:4_189:}
看见你真开心,才女的,可以学习黑黑的文字代码框,诗词 文字你的强项
@马黑黑
继续玩前面学习过的播放器,这个是大彩色球我改小了{:4_170:} 小辣椒 发表于 2023-8-28 21:26
@马黑黑
继续玩前面学习过的播放器,这个是大彩色球我改小了
可大可小,各有妙处 一图三看呢,小辣椒的劲舞图好提神啊,眼睛都看不过来了,慢慢们欣赏……{:4_173:} 师傅挺狠,这弄弄弄的。。。{:4_189:} 这三个组合图个个精彩,都喜欢{:4_187:} 马黑黑 发表于 2023-8-28 21:37
可大可小,各有妙处
是的,而且可以调颜色,这个彩球很漂亮的 哇,这个场景好热闹。这个播放器也好漂亮,这个制作太美了,香宝收礼开心{:4_199:} 千羽 发表于 2023-8-28 21:51
一图三看呢,小辣椒的劲舞图好提神啊,眼睛都看不过来了,慢慢们欣赏……
千羽这个怎么有三看? 东篱闲人 发表于 2023-8-28 21:51
师傅挺狠,这弄弄弄的。。。
{:4_170:}{:4_189:}{:4_196:}{:4_205:}{:4_172:} 小辣椒 发表于 2023-8-28 21:53
是的,而且可以调颜色,这个彩球很漂亮的
你用的好 小辣椒 发表于 2023-8-28 21:53
千羽这个怎么有三看?
因为是由三个板块图组合成的{:4_181:} 红影 发表于 2023-8-28 21:53
哇,这个场景好热闹。这个播放器也好漂亮,这个制作太美了,香宝收礼开心
亲爱的,这个彩球播放器我也是很喜欢的,上次做了个大彩球,今天做个小彩球,同样精彩,很喜欢的彩球播放器效果。网络独一无二的{:4_199:} 千羽 发表于 2023-8-28 21:55
因为是由三个板块图组合成的
就是一个动图啊 马黑黑 发表于 2023-8-28 21:54
你用的好
这个播放器真的太美了,我其实自己做了各种颜色的,感觉个个漂亮 小辣椒 发表于 2023-8-28 21:57
就是一个动图啊
动图在其中呢{:4_181:} 千羽 发表于 2023-8-28 21:58
动图在其中呢
谢谢千羽夸奖{:4_179:} 小辣椒 发表于 2023-8-28 21:58
这个播放器真的太美了,我其实自己做了各种颜色的,感觉个个漂亮
{:4_172:} 小辣椒 发表于 2023-8-28 21:56
亲爱的,这个彩球播放器我也是很喜欢的,上次做了个大彩球,今天做个小彩球,同样精彩,很喜欢的彩球播放 ...
是啊,非常活泼漂亮呢。这个音响效果也很棒的{:4_187:}
页:
[1]
2