AI制作(明月几时有)
本帖最后由 有声有色 于 2025-12-5 08:38 编辑 <br /><br /><div class="t_fsz"><table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_1876423">
<style>
#papa {
margin: 80px 0 0 calc(50% - 593px);
width: 1024px;
height: 640px;
box-shadow: 4px 8px 20px #000;
position: relative;
overflow: hidden;
}
#mplayer {
left: 50%;
bottom: 20px;
transform: translate(-50%);
width: fit-content;
height: fit-content;
color: tan;
position: absolute;
}
#mplayer::before, #mplayer::after {
position: absolute;
content: attr(data-cu);
bottom: 16px;
}
#mplayer::before { left: 10px; }
#mplayer::after {
content: attr(data-du);
right: 10px;
}
#btn {
display: block;
margin: auto;
margin-bottom: 10px;
width: 80px;
height: 80px;
border-radius: 50%;
cursor: pointer;
animation: rot 6s infinite linear var(--state);
}
#prog {
width: 400px;
height: 45px;
border: 1px solid tan;
border-radius: 5px;
display: grid;
place-items: center start;
position: relative;
}
#prog::before, #prog::after {
position: absolute;
content: '';
cursor: pointer;
}
#prog::before {
width: var(--ww);
height: 5px;
border-radius: 5px;
background: linear-gradient(to right, LightSkyBlue, green, LightSkyBlue);
}
#prog::after {
width: 100%;
height:30px;
border: 0px solid red;
}
.cap {
position: absolute;
left: calc(var(--ww) - 2px);
width: 16px;
height: 16px;
background: LightSkyBlue;
border-radius: 50%;
}
.pic {
position: absolute;
right: 0px;
bottom: -80px;
width: 250px;
filter: blur(.5px) opacity(.8);
}
.pic1 {
position: absolute;
left: 80px;
top: 420px;
width: 240px;
}
.biankuang {
position: absolute;
width: px; height: px;
}
#lrc { --motion: cover1; --tt: 5s; --state: paused; position: absolute; left: 20%; transform: translate(-50%); top: 510px; font: bold 2.4em sans-serif; color: hsl(300, 100%, 100%); -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: linear-gradient(180deg, hsla(120, 100%, 50%, .45), hsla(200, 100%, 66%, .6), hsla(60, 100%, 50%, .75)); 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%; } }
.vid { position: absolute; width: 1024px; height: 640px; object-fit: cover; }
@keyframes rot { to { transform: rotate(1turn); } }
</style>
<div id="papa">
<video class="vid" src="https://txmov2.a.kwimgs.com/upic/2025/12/03/14/BMjAyNTEyMDMxNDE0NDJfODk4OTU4MThfMTgxNDA2MjU5NzgyXzJfMw==_b_B278d013077b6cd11daeb7d8f628fe8b8.mp4" autoplay="autoplay" loop="loop" muted="muted"></video>
<img class="biankuang" src="" alt="" />
<img class="pic" src="" alt="" />
<img class="pic1" src="" alt="" />
<div id="lrc" data-lrc="花潮lrc在线"></div>
<div id="mplayer" data-du="00:00" data-cu="00:00">
<img id="btn" src="https://s1.ax1x.com/2023/05/17/p9R5NcQ.png" alt="" />
<div id="prog"><span class="cap"></span></div>
</div>
</div>
<audio id="aud" src="https://music.163.com/song/media/outer/url?id=27598338.mp3" loop autoplay></audio>
<script>
let canmove = false;
btn.addEventListener('click', () => aud.paused ? aud.play() : aud.pause());
aud.addEventListener('play', () => mplayer.style.setProperty('--state','running'));
aud.addEventListener('pause', () => mplayer.style.setProperty('--state','paused'));
aud.addEventListener('timeupdate', () => {
if(!canmove) prog.style.setProperty('--ww', aud.currentTime * prog.offsetWidth / aud.duration + 'px');
mplayer.dataset.cu = toMin(aud.currentTime);
mplayer.dataset.du = toMin(aud.duration);
});
prog.addEventListener('mousemove', (e) => {
if (!canmove) return;
let pos = e.offsetX;
if (pos < 0) pos = 0;
if (pos > prog.offsetWidth) pos = prog.offsetWidth;
prog.style.setProperty('--ww', e.offsetX + 'px');
});
prog.addEventListener('mousedown', (e) => {
canmove = true;
});
prog.addEventListener('mouseup', (e) => {
canmove = false;
aud.currentTime = aud.duration * e.offsetX / prog.offsetWidth;
});
document.addEventListener('mouseup', () => canmove = false);
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;
};
let mKey = 0, mFlag = true;
let lrcAr = [
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
];
let vid = document.querySelector('.vid');
let mState = () => aud.paused ? (lrc.style.setProperty('--state', 'paused'), vid.pause()) : (lrc.style.setProperty('--state', 'running'), vid.play());
let showLrc = (time) => {let name = mFlag ? 'cover1' : 'cover2';lrc.innerHTML = lrcAr;lrc.dataset.lrc = 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 < 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);};
aud.addEventListener('timeupdate', () => {for(let j = 0; j < lrcAr.length; j ++) {if (aud.currentTime >= lrcAr) {if (mKey === j) showLrc(lrcAr);else continue;}}});
aud.addEventListener('pause', () => mState());
aud.addEventListener('play', () => mState());
aud.addEventListener('seeked', () => calcKey());
</script></td></tr></table> 音画大气 感谢有声有色带来的精彩,辛苦了,祝你立冬安康 有声有色朋友冬安! 这个诗书人是我兄弟{:4_170:} 有声老师真是好创意呢!{:4_176:} 很美的月圆之夜! 祝有声有色朋友立冬快乐!{:4_187:} 这是用樵歌的签名形象用来朗诵诗词的呢。制作真漂亮。
欣赏有声有色老师好帖{:4_199:} 这个做的太美了,诗情画意的,AI太强大了{:4_178:} 欣赏老师精彩制作{:4_199:} 偶然~ 发表于 2025-11-7 15:00
感谢有声有色带来的精彩,辛苦了,祝你立冬安康
有你的支持 学习会更努力 梦油 发表于 2025-11-7 16:17
有声有色朋友冬安!
同感 樵歌 发表于 2025-11-7 17:57
有声老师真是好创意呢!
谢谢喜欢 小九 发表于 2025-11-7 18:58
很美的月圆之夜! 祝有声有色朋友立冬快乐!
谢谢一起努力加快乐 红影 发表于 2025-11-7 19:31
这是用樵歌的签名形象用来朗诵诗词的呢。制作真漂亮。
欣赏有声有色老师好帖
是的因樵歌喜欢诗词 小辣椒 发表于 2025-11-7 22:10
这个做的太美了,诗情画意的,AI太强大了
有园林夜色来显示诗词 有声有色 发表于 2025-11-8 11:43
有你的支持 学习会更努力
幸福安康 有声有色 发表于 2025-11-8 11:46
是的因樵歌喜欢诗词
这个构思好,很赞{:4_187:} 有声有色 发表于 2025-11-8 11:48
有园林夜色来显示诗词
制作很漂亮的{:4_199:}
页:
[1]