阅兵操练
本帖最后由 有声有色 于 2026-6-15 13:58 编辑 <br /><br /></div></div>
</div><div class="pct"><style type="text/css">.pcb{margin-right:0}</style><div class="pcb">
<div class="t_fsz">
<table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_1699390">
<style>
#papa { left: -214px; width: 1024px; height: 640px; background: teal url('https://pic1.imgdb.cn/item/66dbfe8ed9c307b7e9b5326f.gif') no-repeat center/cover; box-shadow: 3px 3px 20px #000; display:grid; place-items: center; user-select: none; overflow: hidden; position: relative; z-index: 1; }
#mplayer { position: absolute; top: 200px; width: fit-content; height: fit-content; display: flex; align-items: center; gap: 8px; z-index: 9; }
#btnwrap { position: relative; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #ccc linear-gradient(to top right, rgba(255,0,0,.75), rgba(0,255,0,.75)); cursor: pointer; }
#btnwrap:hover { background: #000 linear-gradient(to top right, rgba(255,0,0,.75), rgba(0,255,0,.75)); }
#btnplay { width: 20px; height: 20px; background: #ccc; clip-path: polygon(0 0, 0% 100%, 100% 50%); }
#btnpause { width: 2px; height: 20px; border-style: solid; border-width: 0px 4px; border-color: transparent #eee; display: none; }
#prog { width: 200px; height: 2px; background: #ccc linear-gradient(to right,red,orange,green,tomato) no-repeat; background-size: 1px 2px; cursor: pointer; position: relative;}
#prog::before { position: absolute; content: ''; top: -7px; width: inherit; height: 15px; }
#prog:hover::before { background: rgba(0,200,200,.15); }
#tmsg { font: normal 16px sans-serif; color: lightblue;}
#lrc { position: absolute; top: 160px; font: bold 1.5em sans-serif; color: lightblue; text-shadow: 1px 1px 2px #000; text-align: center; z-index: 8; }
#lrc:hover, #tmsg:hover { color: snow; }
#mama { position: absolute;top: 70px; width: 300px; height: 300px; overflow: hidden; transform: rotate(45deg); }
.borderLine { position: absolute; animation: flow 4s var(--delay) linear infinite; }
.bl1 { --xx: 200%; --yy: 0%; --delay: 0s; width: 100%; height: 4px; left: -100%; top: 0; background: linear-gradient(to right, red, tan, gold,olive, tomato); }
.bl2 { --xx: 0%; --yy: 200%; --delay: 2s; width: 4px; height: 100%; right: 0; top: -100%; background: linear-gradient(to bottom, red, tan, gold,olive, tomato); }
.bl3 { --xx: -200%; --yy: 0%; --delay: 4s; width: 100%; height: 4px; right: -100%; bottom: 0; background: linear-gradient(to left, red, tan, gold,olive, tomato); }
.bl4 { --xx: 0%; --yy: -200%; --delay: 6s; width: 4px; height: 100%; left: 0; bottom: -100%; background: linear-gradient(to top, red, tan, gold,olive, tomato); }
@keyframes flow { to { transform: translate(var(--xx), var(--yy)); } }
</style>
<div id="papa">
<div id="mplayer"><span id="btnwrap"><span id="btnplay"></span><span id="btnpause"></span></span><span id="prog"></span><span id="tmsg">00:00 | 00:00</span></div>
<div id="lrc">lrc歌词</div>
<div id="mama">
<span class="borderLine bl1"></span>
<span class="borderLine bl2"></span>
<span class="borderLine bl3"></span>
<span class="borderLine bl4"></span>
</div>
</div>
<script>
let lrcAr = [
['0.00','黄梅戏——对唱'],
,
,
,
,
,
,
,
,
,
,
,
,
];
let aud = new Audio();
aud.src = 'http://cccimg.com/view.php/4bd5f6e3335d76f946fcbd856716585e.mp3';aud.autoplay = true;
aud.loop = true;
btnwrap.onclick = () => aud.paused ? aud.play() : aud.pause();
prog.onclick = (e) => aud.currentTime = aud.duration * e.offsetX / prog.offsetWidth;
aud.addEventListener('pause', () => btnstate());
aud.addEventListener('play',() => btnstate());
aud.addEventListener('timeupdate', () => {
prog.style.backgroundSize = prog.offsetWidth * aud.currentTime / aud.duration + 'px 2px';
tmsg.innerText = toMin(aud.duration) + ' | ' + toMin(aud.currentTime);
for(j=0; j<lrcAr.length; j++) {
if(aud.currentTime >= lrcAr) lrc.innerText = lrcAr;
}
});
let btnstate = () => aud.paused ? (btnplay.style.display = 'block', btnpause.style.display = 'none') : (btnplay.style.display = 'none', btnpause.style.display = 'block');
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;
}
</script>
</td></tr></table> 雄壮威武,这个看着太提气了,鼓声、音乐还有行进的步伐,如此激动人心,壮哉,人民子弟兵{:4_199:} 这个做得太好了,给有声有色点赞{:4_187:} 红影 发表于 2022-8-13 14:36
这个做得太好了,给有声有色点赞
谢谢鼓励 红影 发表于 2022-8-13 14:36
雄壮威武,这个看着太提气了,鼓声、音乐还有行进的步伐,如此激动人心,壮哉,人民子弟兵
这好像是两视频合起来做的,老了前做后忘记,我有个问题不知道该问还是不该问,你们论坛里的代码我是否可以套用, 有声有色 发表于 2022-8-13 14:45
这好像是两视频合起来做的,老了前做后忘记,我有个问题不知道该问还是不该问,你们论坛里的代码我是否可 ...
可以啊,我们也都是在套用着玩呢{:4_173:} 有声有色 发表于 2022-8-13 14:41
谢谢鼓励
非常喜欢看阅兵式,特别让人自豪{:4_204:} 红影 发表于 2022-8-13 14:59
可以啊,我们也都是在套用着玩呢
谢谢 ,因为不会做代码,只能套用人家的代码 有声有色 发表于 2022-8-13 15:00
谢谢 ,因为不会做代码,只能套用人家的代码
会的人都是大神级别的,这里大概只有马黑黑才会,其他人都摘在跟着玩的{:4_173:} 红影 发表于 2022-8-13 22:50
会的人都是大神级别的,这里大概只有马黑黑才会,其他人都摘在跟着玩的
你们都是精英,黑黑老师是精英+才 我真羡慕你们,可惜我老了再年轻十岁一定奋追你们。看了你回家的路上做的真棒! 有声有色 发表于 2022-8-14 08:12
你们都是精英,黑黑老师是精英+才 我真羡慕你们,可惜我老了再年轻十岁一定奋追你们。看了你回家的路上 ...
那个也是套用黑黑代码的{:4_173:} 红影 发表于 2022-8-14 11:56
那个也是套用黑黑代码的
会套用代码,也要会自己的思维来创造音画,这样结合就完美了, 有声有色 发表于 2022-8-14 12:52
会套用代码,也要会自己的思维来创造音画,这样结合就完美了,
是的,自己也是需要动点脑筋的。
页:
[1]