加林森 发表于 2022-3-19 00:01

时间到!

准备休息了。。。。。。

红影 发表于 2022-3-19 08:34

队长辛苦了{:4_187:}

马黑黑 发表于 2022-3-19 09:11

最近审美把脖子弄出问题来了?

加林森 发表于 2022-3-19 11:16

本帖最后由 加林森 于 2022-5-31 13:56 编辑 <br /><br />红影 发表于 2022-3-19 08:34
队长辛苦了
不辛苦的。

<style>
.wrap {
      left: -20px;
      width: 800px; height: 463px;
      background: teal url('https://pic.imgdb.cn/item/6295ada509475431291eb318.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="https://music.163.com/song/media/outer/url?id=566442175.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-3-19 11:16

马黑黑 发表于 2022-3-19 09:11
最近审美把脖子弄出问题来了?

没有啊

马黑黑 发表于 2022-3-19 11:22

加林森 发表于 2022-3-19 11:16
没有啊

没有就好

加林森 发表于 2022-3-19 11:24

马黑黑 发表于 2022-3-19 11:22
没有就好

嗯嗯

马黑黑 发表于 2022-3-19 18:26

甚好甚好,甚好啊{:4_170:}

加林森 发表于 2022-3-19 18:30

马黑黑 发表于 2022-3-19 18:26
甚好甚好,甚好啊

今天这么开心啊。{:4_189:}

好开心 发表于 2022-3-19 18:43

队长零点休息啊!我都是十一点半

加林森 发表于 2022-3-19 18:55

好开心 发表于 2022-3-19 18:43
队长零点休息啊!我都是十一点半

是的,12点准时下班。{:4_189:}

红影 发表于 2022-3-19 20:03

加林森 发表于 2022-3-19 11:16
不辛苦的。

有你守坛,病毒全赶跑{:4_173:}

加林森 发表于 2022-3-19 20:48

红影 发表于 2022-3-19 20:03
有你守坛,病毒全赶跑

肯定的。。。{:4_189:}

加林森 发表于 2022-3-20 00:02

{:5_110:}睡觉啦!
页: [1]
查看完整版本: 时间到!