《风の歌》- 広橋真紀子 (学习老黑都是我的制作)
<style>#papa { left: -214px; width: 1024px; height: 800px; box-shadow: 3px 3px 30px #000; border-radius: 6px; background: rgba(0,0,0,.6) url('https://pic.imgdb.cn/item/62d69ed8f54cd3f93776fb48.jpg') no-repeat center/cover; perspective: 2000px;position: relative; }
#ani { position: absolute; left: calc(50% - 150px); top: calc(50% - 350px); width: 600px; height: 700px; box-shadow: 2px 2px 10px #000; background: #ccc; transform-style: preserve-3d; }
#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; }
@keyframes ani1 { 20% { transform: rotateY(30deg); } 40% { transform: rotateY(-30deg); } 0%,60%,100% {transform: rotateY(0deg); } }
@keyframes ani2 { 20% { transform: rotateX(15deg); } 40% { transform: rotateX(-15deg); } 0%,60%,100%{transform: rotateX(0deg); } }
@keyframes ani3 { 20% { transform: rotateZ(20deg); } 40% { transform: rotateZ(-20deg); } 0%,60%,100% {transform: rotateZ(0deg); } }
@keyframes ani4 { 20% { transform: scale(1.2); } 40% { transform: scale(0.8); } 0%,60%,100% {transform: scale(1); } }
@keyframes ani5 { 20% { transform: skew(15deg); } 40% { transform: skew(-15deg); } 0%,60%,100% {transform: skew(0deg); }}
@keyframes in { from { transform: rotate(0) scale(0); } to {transform: rotate(1turn) scale(1); } }
@keyframes out{ from { transform: rotate(0) scale(1); } to {transform: rotate(-1turn) scale(0); } }
</style>
<div id="papa">
<img id="ani" alt="" src="https://pic.imgdb.cn/item/62d624bbf54cd3f9372eb036.jpg">
<div id="playbox">
<p id="geci" style="font-size: 1.2em; text-shadow: 1px 1px 1px #222">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">00:00</span>
</p>
</div>
</div>
<audio id="aud" src="https://music.163.com/song/media/outer/url?id=577879.mp3" autoplay="autoplay" loop="loop"></audio>
<script>
let flag = 0, last = 0;
let picAr = [
'https://pic.imgdb.cn/item/62d624bbf54cd3f9372eb036.jpg',
'https://pic.imgdb.cn/item/62d6254ef54cd3f937313aba.jpg',
'https://pic.imgdb.cn/item/62d625d8f54cd3f937339f1e.jpg',
'https://pic.imgdb.cn/item/62d62775f54cd3f9373ab563.jpg',
'https://pic.imgdb.cn/item/62d62800f54cd3f9373d0380.jpg',
'https://pic.imgdb.cn/item/62d6289df54cd3f9373f9f8b.jpg',
'https://pic.imgdb.cn/item/62d6291ff54cd3f93741ca87.jpg',
'https://pic.imgdb.cn/item/62d629a3f54cd3f937440ecf.jpg',
'https://pic.imgdb.cn/item/62d62a25f54cd3f9374646f2.jpg',
'https://pic.imgdb.cn/item/62d62a92f54cd3f93748de54.jpg',
];
let aniAr = Array.from({length:5}, (_, x) => 'ani' + (x+1));
let num = (min, max) => Math.floor(Math.random() * (max-min+1)) + min;
let lrcAr = [ ['0.00','风の歌 - 広橋真紀子'], ['240.00','祝大家消暑愉快'] ];
picAni();
function picAni() {
if(flag == 0) {
let pic = num(0, picAr.length - 1);
if(pic == last) pic = last < 1 ? pic + 1 : pic - 1;
ani.src = picAr;
ani.style.animation = 'in 8s linear forwards';
last = pic;
flag = 1;
} else if(flag == 1) {
let idx = num(0,aniAr.length - 1);
ani.style.animation = aniAr + ' 8s linear forwards';
flag = 2
} else {
ani.style.animation = 'out 8s linear forwards';
flag = 0;
}
setTimeout(picAni,8000);
}
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 '00:00';
val = Math.floor(val);
let min = parseInt(val / 60);
let sec = parseFloat(val % 60);
if(min < 10) min = '0' + min;
if(sec < 10) sec = '0' + sec;
return min + ':' + sec;
}
</script>
@马黑黑 队长这个是鸟鸟图鉴。好看。赞。 马黑黑 发表于 2022-7-19 12:42
队长这个是鸟鸟图鉴。好看。赞。
我原本的意思是鸟语花香,结果音乐不能用。谢谢老黑鼓励! 加林森 发表于 2022-7-19 12:48
我原本的意思是鸟语花香,结果音乐不能用。谢谢老黑鼓励!
音乐可以慢慢找,总要,下载了长传再用 马黑黑 发表于 2022-7-19 12:52
音乐可以慢慢找,总要,下载了长传再用
哦,要这样啊。好的,我去试一试。 加林森 发表于 2022-7-19 12:55
哦,要这样啊。好的,我去试一试。
好 马黑黑 发表于 2022-7-19 13:19
好
我没有地方可以上传的。在本论坛也不准上传呢? 你学的真快,真好。 梦油 发表于 2022-7-19 15:07
你学的真快,真好。
我看见了就可以制作出来的。 漂亮,队长学得真快{:4_187:} 红影 发表于 2022-7-19 15:47
漂亮,队长学得真快
是的。老黑的是走T台,我就来-个鸟语花香。 可爱得很哟{:4_208:} 樵歌 发表于 2022-7-19 16:44
可爱得很哟
巴适得扳{:4_189:} 队长太厉害了吧,又出来一个 加林森 发表于 2022-7-19 15:27
我看见了就可以制作出来的。
你的悟性好啊 绿叶清舟 发表于 2022-7-19 16:55
队长太厉害了吧,又出来一个
不厉害啊,跟着老黑学习就制作出来了。 梦油 发表于 2022-7-19 17:12
你的悟性好啊
还不错的。 加林森 发表于 2022-7-19 17:17
还不错的。
是的。 梦油 发表于 2022-7-19 17:18
是的。
嗯嗯。{:4_190:}