好的
嗯嗯。
<style>
#papa { left: -302px; width: 1200px; height: 750px; background: #000 url('https://pic.imgdb.cn/item/62d28428f54cd3f937d78a12.jpg') no-repeat; perspective: 3000px; box-shadow: 3px 3px 20px #000; display: flex; justify-content: center; align-items: center; border-radius: 6px; position: relative; }
#mypic { position: absolute; width: 600px; height: 600px; box-shadow: inherit; transform-style: preserve-3d; transition: all 6s linear; }
#mypic>img { width: 100%; height: 100%; opacity: .9; }
#papa p { margin: 0; padding: 0; }
#papa input { border: none; outline: none; opacity: .75; cursor: pointer; }
#playbox { position: absolute; left: 20px; bottom: 20px; padding: 10px; font: normal 1em sans-serif; color: #eee; background: rgba(255,255,255,.2); border-radius: 8px; backdrop-filter: blur(1px); overflow: hidden; box-shadow: 1px 1px 2px rgba(0,0,0,.15); z-index: 100; }
#btnplay { width: 30px; height: 30px; border-radius: 50%; }
#btnplay:hover { background: #aaa; color: #ff0000; }
</style>
<div id="papa">
<div id="mypic"><img id="myImg" src="https://pic.imgdb.cn/item/62d28562f54cd3f937d94967.jpg" alt="" /></div>
<div id="playbox">
<p id="geci" style="font-size: 1.2em; text-shadow: 1px 1px 1px #222">LRC Loading ... </p>
<p style="display: flex; align-items: center; gap: 4px; margin-top: 10px;">
<input id="btnplay" type="button" value=">" />
<input id="slider" type="range" min="0" max="100" value="0" />
<span id="per">0%</span>
</p>
</div>
<audio id="aud" src="https://music.163.com/song/media/outer/url?id=325594.mp3" autoplay="autoplay" loop="loop"></audio>
</div>
<script>
let picAr = [
'https://pic.imgdb.cn/item/62d28562f54cd3f937d94967.jpg',
'https://pic.imgdb.cn/item/62d28608f54cd3f937da3c43.jpg',
'https://pic.imgdb.cn/item/62d28688f54cd3f937dae83b.jpg',
'https://pic.imgdb.cn/item/62d2872df54cd3f937dbbf0c.jpg',
'https://pic.imgdb.cn/item/62d287d3f54cd3f937dcacd9.jpg',
'https://pic.imgdb.cn/item/62d288e3f54cd3f937de389f.jpg',
'https://pic.imgdb.cn/item/62d2897bf54cd3f937df082c.jpg',
'https://pic.imgdb.cn/item/62d289f8f54cd3f937dfb7be.jpg'
];
let lrcAr = [
['0.00','羌笛 - 云朵'],
['320.00','谢谢欣赏']
];
let idx = 0;
let num = (min, max) => Math.floor(Math.random() * (max-min+1)) + min;
setTimeout(setAni(), 3000);
slider.onmousedown = () => aud.pause();
slider.onchange = () => { aud.currentTime = slider.value * aud.duration / 100; aud.play(); }
btnplay.onclick = () => aud.paused ? aud.play() : aud.pause();
aud.addEventListener('playing', () => btnplay.value = '||');
aud.addEventListener('pause', () => btnplay.value = '>');
aud.addEventListener('timeupdate', () => {
let prog = 100 * aud.currentTime / aud.duration;
slider.value = prog;
per.innerText = toMin(aud.currentTime) + ' | ' + toMin(aud.duration);
for(j=0; j<lrcAr.length; j++){
if(aud.currentTime >= lrcAr) geci.innerHTML = lrcAr;
}
});
let toMin = (val) => {
if(!val) return '0:0';
val = Math.floor(val);
return parseInt(val / 60) + ':' +parseFloat(val % 60);
}
function setAni() {
let xx = num(-60,60), yy = num(-60,60), zz = num(-120,120);
aniRot(mypic,xx,yy,zz);
chgPic();
setTimeout(setAni,10000);
}
function aniRot(ele,x,y,z) {
ele.style.transform = `rotateX(${x}deg) rotateY(${y}deg) rotateZ(${z}deg)`;
}
function chgPic() {
idx = num(0, picAr.length - 1);
myImg.src = picAr;
}
</script> 马黑黑 发表于 2022-6-7 21:24
绝对不想
那就好 加林森 发表于 2022-6-7 20:59
这个定位还可以吧。
嗯嗯,定位很准确。 队长这个图图的色彩漂亮,这个小按钮也是配的好,队长就这样找感觉。。。。。制作会越来越漂亮的{:4_178:} 红影 发表于 2022-6-7 22:12
嗯嗯,定位很准确。
是的。我调了许久的。 红影 发表于 2022-6-7 22:12
嗯嗯,定位很准确。
是的。我调了许久的。 小辣椒 发表于 2022-6-7 22:12
队长这个图图的色彩漂亮,这个小按钮也是配的好,队长就这样找感觉。。。。。制作会越来越漂亮的
谢谢小辣椒了。好玩就开心的哦。 加林森 发表于 2022-6-7 20:58
老梦晚上好!好听吧。
好听,好听。谢谢你,老林。 梦油 发表于 2022-6-8 10:55
好听,好听。谢谢你,老林。
不客气啊。 加林森 发表于 2022-6-7 22:45
是的。我调了许久的。
是呢,就是要这样仔细调呢。队长真棒{:4_187:} 红影 发表于 2022-6-8 15:55
是呢,就是要这样仔细调呢。队长真棒
嗯嗯,现在搞懂该怎么调整了。{:4_189:} 加林森 发表于 2022-6-8 16:18
嗯嗯,现在搞懂该怎么调整了。
这样才好呢,可以看需要定位按钮了。队长真棒{:4_204:} 红影 发表于 2022-6-8 22:40
这样才好呢,可以看需要定位按钮了。队长真棒
谢谢红影啦!{:4_204:}{:4_190:} 加林森 发表于 2022-6-8 22:46
谢谢红影啦!
队长现在这个按钮已经学得很好了,可以再找个效果也这样学习,别总是简单套用,这样很难进步的啊{:4_173:} 红影 发表于 2022-6-9 08:30
队长现在这个按钮已经学得很好了,可以再找个效果也这样学习,别总是简单套用,这样很难进步的啊{:4_173: ...
嗯嗯,知道了。
页:
1
[2]