DJ中文串烧慢摇音乐舞曲
本帖最后由 三月的阳光 于 2023-5-21 21:04 编辑 <br /><br /><div class="t_fsz"><table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_1896100">
<style>
#papa {
margin: 0 0 0 calc(50% - 523px);
width: 1024px;
height: 593px;
background:
url('http://5b0988e595225.cdn.sohucs.com/images/20170929/33ae54f0b6134c85817b42bdb9157e67.gif') no-repeat center/cover,
#000 url('https://tukuimg.bdstatic.com/scrop/4600e4f91e57f27dd30377961343eeb3.gif') no-repeat center;
background-blend-mode: screen;
box-shadow: 0 0 8px #000;
position: relative;
display: grid;
place-items: center;
overflow: hidden;
--state: paused;
}
#vid {
position: absolute;
width: 1400px;
height: 100%;
border-radius: 2%;
opacity: .53;
object-fit: cover;
pointer-events: none;
mix-blend-mode: screen;
}
css-doodle { position: absolute; }
</style>
<div id="papa">
<css-doodle id="mplayer">
:doodle { @size: 80px; animation: rot 4s infinite linear var(--state); cursor: pointer; }
background: rgba(244,164,96,.9);
clip-path: @shape(
points: 18;
R: seq(.618, 1, 0);
T: seq(t-.55, t, t);
x: R * cos(T);
y: R * sin(T);
);
@keyframes rot { to { transform: rotate(1turn); } }
</css-doodle>
<css-doodle id="lrc">
:doodle {
@size: auto 4em;
bottom: 10px;
--geci: "css-doodle player"; --motion: cover2; --tt: 1s; } /* 单元格两个伪元素显示lrc歌词 */
display: grid; place-items: center start; :before, :after { content: var(--geci); color: Honeydew; /* 歌词底色 */ font: bold 2em sans-serif; text-shadow: 1px 1px 2px #000; white-space: pre; } :after { position: absolute; width: 0; color:SandyBrown; /* 同步歌词颜色 */ overflow: hidden; animation: var(--motion) var(--tt) linear forwards var(--state); } @keyframes cover1 { from { width: 0; } to { width: 100%; } } @keyframes cover2 { from { width: 0; } to { width: 100%; } } </css-doodle>
<video id="vid" src="https://img.tukuppt.com/video_show/2475824/00/01/98/5b4f6e0bce145.mp4" autoplay="" loop="" muted=""></video>
<audio id="aud" src="https://music.163.com/song/media/outer/url?id=27853618" autoplay loop></audio>
</div>
<script>
let slip = 0.5, mFlag = true, mKey = 0, clickIdx = 0, progChg = 0, cursors = ['default','pointer','pointer'];
let lrcAr = [
,
,
];
let calcKey = () => {for (j = 0;j < lrcAr.length;j++) {if (aud.currentTime <= lrcAr) {mKey = j - 1;break;}}if (mKey < 0) mKey = 0;if (mKey > lrcAr.length - 1) mKey = lrcAr.length - 1;let time = lrcAr - (aud.currentTime - lrcAr);showLrc(time);};
let script = document.createElement('script');
script.src = 'https://638183.freep.cn/638183/web/api/css-doodle.js';
document.body.appendChild(script);
let mState = () => papa.style.setProperty('--state', aud.paused ? 'paused' : 'running');
let showLrc = (time) => {lrc.style.setProperty('--motion', mFlag ? 'cover1' : 'cover2');lrc.style.setProperty('--geci', '"' + lrcAr + '"');lrc.style.setProperty('--tt', time + 's');mKey += 1;mFlag = !mFlag;};
aud.addEventListener('play', mState, false);
aud.addEventListener('pause', mState, false);
aud.addEventListener('timeupdate', () => {for (j = 0; j < lrcAr.length; j++) {if (aud.currentTime - slip >= lrcAr) {cKey = j;if (mKey === j) showLrc(lrcAr);else continue;}}mplayer.style.setProperty('--ttmsg1', `'${toMin(aud.currentTime)}'`);mplayer.style.setProperty('--ttmsg2', `'${toMin(aud.duration)}'`);mplayer.style.setProperty('--prog',`${100 * aud.currentTime / aud.duration}%`);});
mplayer.onclick = () => aud.paused ? aud.play() : aud.pause();
</script></td></tr></table> @蜻蜓 @一抹微蓝 @蜻蜓@一抹微蓝 来一曲舞曲,祝周末快乐~~{:10_402:}{:10_402:} 三月的阳光 发表于 2023-5-21 21:04
@蜻蜓 @一抹微蓝
来了哦,欣赏师兄的大作{:10_402:}
先到先欣赏{:10_402:} 我听不到音乐啊,是我电脑浏览器的问题,还是别的问题啊。 愤怒の葡萄 发表于 2023-5-21 21:08
我听不到音乐啊,是我电脑浏览器的问题,还是别的问题啊。
你的浏览器的问题
这音乐真带劲{:10_402:} 蜻蜓 发表于 2023-5-21 21:10
你的浏览器的问题
我去试试看360浏览器,火狐现在也不行了。
蜻蜓 发表于 2023-5-21 21:06
来了哦,欣赏师兄的大作
给师妹上茶~~{:9_365:}