加林森 发表于 2022-6-2 10:01

《Promise(Reprise)》- 山岡晃


<style>

.outer { left: -342px; width: 1280px; height: 720px; display: flex; justify-content: center; align-items: center; background: tan url('https://pic.imgdb.cn/item/629818c00947543129a766c6.jpg') no-repeat; position: relative; }
.stage { width: 200px; height: 200px; display: flex; justify-content: center; align-items: center; cursor: pointer; position: absolute; }
.stage meter { width: 200px; }
.ball { position: absolute; width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(120deg, #778899,#DEB887); z-index: 99; }
.ball::before{ position: absolute; content: ''; width: 10px; height: 10px; top: calc(50% - 5px); left: calc(50% - 5px); border-radius: 50%; background: linear-gradient(120deg,olive,tan); animation: sway 6s linear infinite; }
@keyframes sway { from { transform: rotate(0turn) translateY(-40px); } to { transform: rotate(1turn) translateY(-40px); } }

</style>

<div class="outer">
        <div class="stage">
                <div class="ball"></div>
                <meter id="meter" min="0" max="100" low="33" high="66" optimum="80" value="1"></meter>
        </div>
        <audio id="aud" src="https://music.163.com/song/media/outer/url?id=18861466.mp3" autoplay="autoplay" loop="loop"></audio>
</div>
<script>

let stage = document.querySelector('.stage'),
        meter = document.querySelector('#meter'),
        ball = document.querySelector('.ball'),
        aud = document.querySelector('#aud');

aud.addEventListener('timeupdate',function(){
        let prog = 100 * aud.currentTime / aud.duration;
        let deg = prog * 360 / 100;
        ball.style.transform = 'rotate(' + deg + 'deg) translateY(-' + prog + 'px)';
        meter.value = prog;
});

stage.onclick = () => aud.paused ? aud.play() : aud.pause();

</script>

小辣椒 发表于 2022-6-2 10:56

看看队长的按钮小圆变化。。。。

加林森 发表于 2022-6-2 11:39

小辣椒 发表于 2022-6-2 10:56
看看队长的按钮小圆变化。。。。

三种颜色的变化。

红影 发表于 2022-6-2 14:56

队长又弄了个啊。

加林森 发表于 2022-6-2 15:35

红影 发表于 2022-6-2 14:56
队长又弄了个啊。

是啊。

马黑黑 发表于 2022-6-2 17:59

队长都学会弹钢琴了,腻害哈

加林森 发表于 2022-6-2 18:02

马黑黑 发表于 2022-6-2 17:59
队长都学会弹钢琴了,腻害哈

是啊,会弹的。

马黑黑 发表于 2022-6-2 18:02

加林森 发表于 2022-6-2 18:02
是啊,会弹的。

腻害腻害,俺也能有脚弹呢{:5_117:}

加林森 发表于 2022-6-2 18:04

马黑黑 发表于 2022-6-2 18:02
腻害腻害,俺也能有脚弹呢

说明你很牛。。。。{:4_189:}

马黑黑 发表于 2022-6-2 18:33

加林森 发表于 2022-6-2 18:04
说明你很牛。。。。

因为俺手脚是一样的{:4_170:}

加林森 发表于 2022-6-2 19:09

马黑黑 发表于 2022-6-2 18:33
因为俺手脚是一样的

{:4_172:}
页: [1]
查看完整版本: 《Promise(Reprise)》- 山岡晃