《两只蝴蝶》(纯音乐)
<style>
.wrap {
left: -214px;
width: 1024px; height: 682px;
background: teal url('https://pic.imgdb.cn/item/628a33fe094754312933ffc7.jpg') no-repeat center/cover;
position: relative;
}
.circle {
display: flex;
justify-content: center;
align-items: center;
width: 80px; height: 80px;
left: 10px; bottom: 10px;
border: solid 6px transparent;
border-radius: 50%;
background-image: radial-gradient(ghostwhite, transparent), linear-gradient(120deg,tomato,green,red,gold);
background-origin: border-box;
background-clip: content-box, border-box;
cursor: pointer;
font: normal 14px sans-serif;
position: absolute;
}
.circle::before { position: absolute; content: attr(data-per); bottom: 20%;}
.circle::after { position: absolute; content: ''; width: 10px; height: 10px; background: olive; border-radius: 50%; }
.hand {
position: absolute; width: 2px; height: 50%;
bottom: 50%; background: rgba(200,20,20,.45);
transform-origin: bottom;
}
.wrap::before {
content: '';
position: absolute;
width: 50%;
height: 50%;
background: url('https://pic.imgdb.cn/item/6235d74f5baa1a80ab9d74a0.gif') no-repeat
center/cover;
opacity: .55;
left:30px; top: 20px;
}
</style>
<div class="wrap">
<div class="circle" data-per="0%">
<div class="hand"></div>
</div>
</div>
<audio id="aud" src="http://www.kumeiwp.com/sub/filestores/2022/05/22/101498f4829181c40fb67b5d1aa046fb.mp3" autoplay="autoplay" loop="loop"></audio>
<script>
let circle = document.querySelector('.circle');
let hand = document.querySelector('.hand');
let aud = document.querySelector('#aud');
let current, task;
aud.addEventListener('timeupdate', function(){
task = aud.duration;
current = aud.currentTime;
setProgress(task,current);
});
circle.onclick = () =>{ aud.paused ? aud.play() : aud.pause(); };
function setProgress(tt,cc) {
if(tt <= 0 || cc <= 0) return false;
let prog = 100 * cc / tt;
hand.style.transform = `rotate(${360*prog/100}deg`;
circle.setAttribute('data-per', prog.toFixed(2) + '%');
}
</script>
队长你会不会今天做的太多啊 小辣椒 发表于 2022-5-22 21:21
队长你会不会今天做的太多啊
今天不再做了。有点累了。 加林森 发表于 2022-5-22 21:23
今天不再做了。有点累了。
明天也是不要做太多,注意身体 小辣椒 发表于 2022-5-22 21:27
明天也是不要做太多,注意身体
明天下午还要去养老院给老母亲送东西去呢。 两只蝴蝶慢慢飞,小心前面带刺的玫瑰。{:4_173:}
这个画面真美,色彩真鲜艳{:4_187:} 红影 发表于 2022-5-22 21:37
两只蝴蝶慢慢飞,小心前面带刺的玫瑰。
这个画面真美,色彩真鲜艳
就是,很漂亮的图片,再添加了两只会飞的蝴蝶,画面就活啦。 蝴蝶真大!{:5_116:} 东篱闲人 发表于 2022-5-22 21:55
蝴蝶真大!
喜欢不? @马黑黑 一个字:艳 马黑黑 发表于 2022-5-22 23:53
一个字:艳
谢谢啦!我去休息啦!明天见!
页:
[1]