评弹——苏州好风光
本帖最后由 有声有色 于 2023-5-18 13:10 编辑 <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: 5px;
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: 140px;
top: 120px;
width: 840px;
}
.biankuang {
position: absolute;
width: 1024px; height: 640px;
}
#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="//img.tukuppt.com/video_show/2629112/00/02/34/5b57dc0890be5.mp4" autoplay="autoplay" loop="loop" muted="muted"></video>
<img class="biankuang" src="https://s1.ax1x.com/2023/05/15/p9gDfII.png" alt="" />
<img class="pic" src="https://pic2.imgdb.cn/item/6461cc780d2dde5777b35564.gif" alt="" />
<img class="pic1" src="https://pic2.imgdb.cn/item/646305390d2dde577774b7b7.gif" alt="" />
<div id="lrc" data-lrc="花潮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=481855142.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> 无声 和昨天一样的情况
那个 link.hhtjim.com/163/ 不好用了 起个网名好难 发表于 2023-5-16 13:46
和昨天一样的情况
那个 link.hhtjim.com/163/ 不好用了
是的,谢谢我再去找找其他MP3 有声有色 发表于 2023-5-16 14:43
是的,谢谢我再去找找其他MP3
就是格式改改就行
现在是 https://link.hhtjim.com/163/481855142.mp3
改作 https://music.163.com/song/media/outer/url?id=481855142.mp3
起个网名好难 发表于 2023-5-16 13:44
无声
改了http有声音吗 起个网名好难 发表于 2023-5-16 15:01
就是格式改改就行
现在是 https://link.hhtjim.com/163/481855142.mp3
改作 https://music.163.com/son ...
这是你昨天给我的MP3 有声有色 发表于 2023-5-16 15:08
这是你昨天给我的MP3
比较一下,两个的前半部不同后半部都是网易音乐ID.mp3 起个网名好难 发表于 2023-5-16 15:12
比较一下,两个的前半部不同后半部都是网易音乐ID.mp3
是的,我是根本不懂,今天没你的指教就一事无成了。谢谢 有声有色 发表于 2023-5-16 15:19
是的,我是根本不懂,今天没你的指教就一事无成了。谢谢
客气了 好韵味! 直接去听链接能听到,帖子里的听不到呢{:4_187:} 樵歌 发表于 2023-5-16 19:28
好韵味!
谢谢鼓励 本帖最后由 有声有色 于 2023-5-17 07:07 编辑
红影 发表于 2023-5-16 20:40
直接去听链接能听到,帖子里的听不到呢
是吗,怎么又听不到了,我有换了MP3这个能听到吗 有声有色 发表于 2023-5-17 07:02
是吗,怎么又听不到了,我有换了MP3这个能听到吗
现在能听到了,真好听{:4_199:} 这个制作好听又好看,有声有色真棒{:4_199:} 红影 发表于 2023-5-17 10:06
这个制作好听又好看,有声有色真棒
谢谢·鼓励,我还是TO了你的诗朗诵代码才能做出来的,谢谢了 真好听的曲子,欣赏点赞!{:4_187:} 梦缘 发表于 2023-5-17 11:02
真好听的曲子,欣赏点赞!
谢谢鼓励 有声有色 发表于 2023-5-17 10:34
谢谢·鼓励,我还是TO了你的诗朗诵代码才能做出来的,谢谢了
那个帖子里的边框还是借用你的呢{:4_187:}
页:
[1]