《清心咒》- 相大雷 (快要入伏了,让大家放松一下。)
<style>
#papa { left: -352px;width: 1300px; height: 865px; background: blue url('https://pic.imgdb.cn/item/62d106dcf54cd3f937f90914.jpg') no-repeat center/cover; box-shadow: 4px 4px 24px #000; position: relative; }
#hunter { position: absolute; width: 122px; height: 147px; transition: left 3s, top 3s;z-index: 99; }
#prey { position: absolute; width: 240px; height: 240px; border-radius: 50%; }
#btnplay { position: absolute;left: 20px; top: 20px; width: 30px; height: 30px; cursor: pointer; border: none; outline: none; border-radius: 50%; }
#btnplay:hover { color: red; box-shadow: 1px 1px 1px #000; }
#lrcbox { position: absolute;left: 60px;top: 20px;font: normal 1.2em / 1.6em '宋体', sans-serif;color: snow;text-shadow: 1px 1px 2px #000; }
</style>
<div id="papa">
<input id="btnplay" type="button" value=">" />
<div id="lrcbox">LRC LOADING ...</div>
<img id="hunter" alt="" src="https://pic.imgdb.cn/item/6247e3c027f86abb2a56f17a.gif" />
<img id="prey" src="https://pic.imgdb.cn/item/62d0e127f54cd3f937c47bb3.jpg" alt="" />
</div>
<audio id="aud" src="https://music.163.com/song/media/outer/url?id=533881119.mp3" autoplay="autoplay" loop="loop"></audio>
<script>
let last = 0;
let lrcAr = [
['0.00','曲名 : 清心咒'],
['5.00','歌手 : 相大雷'],
['10.00','帖名 : 纯音乐'],
['160.00','谢谢欣赏 ']
];
let num = (min, max) => Math.floor(Math.random() * (max-min+1)) + min;
setTimeout(gogo,100);
btnplay.onclick = () => aud.paused ? aud.play() : aud.pause();
aud.addEventListener('playing', () => btnplay.value = '||');
aud.addEventListener('pause', () => btnplay.value = '>');
aud.addEventListener('timeupdate',function(){
let tt = aud.currentTime;
for(j=0; j<lrcAr.length; j++){
if(tt >= lrcAr) lrcbox.innerHTML = lrcAr;
}
});
function gogo() {
let left = num(50,1050), top = num(420,518);
hunter.style.transform = last < left ? 'scale(1,1)' : 'scale(-1,1)';
prey.style.left = left + 'px';
prey.style.top = top + 'px';
hunter.style.left = left + 45 + 'px';
hunter.style.top = top - 100 + 'px';
last = left;
setTimeout(gogo,6000);
}
</script>
@马黑黑 看到你的作品,酷热暑气消去了一半。 梦油 发表于 2022-7-15 17:24
看到你的作品,酷热暑气消去了一半。
那就好啊。 淡雅而美。赞。 马黑黑 发表于 2022-7-15 18:08
淡雅而美。赞。
谢谢老黑。{:4_191:} 队长又做了个鹰转向啊,真快。漂亮{:4_187:} 红影 发表于 2022-7-15 20:30
队长又做了个鹰转向啊,真快。漂亮
谢谢!
页:
[1]