大猫咪 发表于 2022-3-23 18:36

小九 发表于 2022-3-20 23:02
谢谢猫咪! 一起开心作图

小九晚上 好{:4_187:}

加林森 发表于 2022-3-23 19:06

本帖最后由 加林森 于 2022-6-19 22:56 编辑 <br /><br />大猫咪 发表于 2022-3-23 18:36
队长晚上好
猫猫上来啦。回家了吧。{:4_179:}

<style>
.outer { left: -224px; width: 1040px; height: 692px; top: 120px; background: linear-gradient(to right top,black,#eee); position: relative; }
.outer h2 { position: absolute; margin: 110px; font: bold 1.8em sans-serif;color: #ccc; text-shadow: 1px 1px 2px #000; }
.picbox        { position: absolute; width: 1040px; height: 692px; animation: fadein 2s; }
.mama { left: 150px; bottom: 380px; width: fit-content; height: fit-content; position: absolute; cursor: pointer; border-radius: 0 100%; background: linear-gradient(transparent,green); }
.wrap { width: 90px; height: 60px; box-reflect: below 0 linear-gradient(rgba(0,0,0,.01),#000); -webkit-box-reflect: below 0 linear-gradient(rgba(0,0,0,.01),#000); position: relative; }
.mama meter { width: 90px; position: relative; }
.wrap span { width: 6px; height: 60px; bottom: -8px; display: inline-block; position: absolute; }
.wrap span::before { position: absolute; content: ''; width: inherit; height: 3px; background: #eee; top: -3px; animation: up 1s ease-in infinite; }
@keyframes up { from { top: -6px; } to { top: -16px; } }
@keyframes fadein { from { opacity: .1; } to {opacity: 1; } }
@keyframes fadeout { from { opacity: 1; } to {opacity: .4; } }
</style>

<div class="outer">
        <h2>醉相思--祁隆</h2>
        <img class="picbox" src="https://wx.ttt.dj/2022/06/19/01.jpg" alt="" />
        <div class="mama">
                <div class="wrap"></div>
                <meter id="meter" value="0" min="0" max="100" low="33" high="66" optimum="70"></meter>
        </div>
</div>
<audio id="aud" src="https://wx.ttt.dj/2022/06/19/zxs.mp3" autoplay="autoplay" loop="loop"></audio>

<script>

let mama = document.querySelector('.mama'),
        picbox = document.querySelector('.picbox'),
        wrap = document.querySelector('.wrap'),
        lrcbox = document.querySelector('.lrcbox'),
        aud = document.querySelector('#aud'),
        meter = document.querySelector('#meter');
let num = (min, max) => Math.floor(Math.random() * (max-min+1)) + min,
        prog = (tt, cc) => 100 * cc / tt;
let picAr = ['1','2','3','4','5'], idx = 0, flag = true;
let newPic = picAr.map((img) => {
        return ('https://wx.ttt.dj/2022/06/19/0' + img + '.jpg');
})

Array.from({length: 10}).forEach((ele,key) => {
        ele = document.createElement('span');
        ele.className = 'sskey';
        ele.style.left = key * 6 + key * 3 + 'px';
        ele.style.height = num(10,60) + 'px';
        ele.style.backgroundColor = `rgba(${num(0,255)},${num(0,255)},${num(0,255)},.95)`;
        wrap.appendChild(ele);
})

let sskey = document.querySelectorAll('.sskey');

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

aud.addEventListener('timeupdate', () => {
        Array.from(sskey).forEach((ele) => {
                ele.style.height = num(10, 60) + 'px';
        })
        meter.value = prog(aud.duration, aud.currentTime);
});

let timer = setInterval(() => {
        picbox.style.animation = '';
        idx ++;
        if(idx >= picAr.length) idx = 0;
        picbox.src = newPic;
        flag ? (picbox.style.animation = 'fadeout 2s', flag = false) : (picbox.style.animation = 'fadein 2s', flag = true);
}, 5000);

</script>
<br><br><br><br><br><br><br><br><br><br><br>

大猫咪 发表于 2022-3-23 19:08

加林森 发表于 2022-3-23 19:06
猫猫上来啦。回家了吧。

刚回来{:4_187:} 队长晚上好{:4_190:}

加林森 发表于 2022-3-23 19:15

大猫咪 发表于 2022-3-23 19:08
刚回来 队长晚上好

晚上好。吃晚饭没有?

大猫咪 发表于 2022-3-23 19:16

加林森 发表于 2022-3-23 19:15
晚上好。吃晚饭没有?

吃了队长   随便打发点{:4_204:}{:4_190:}

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

大猫咪 发表于 2022-3-23 19:16
吃了队长   随便打发点

吃了就可以玩了。{:4_189:}{:4_190:}

大猫咪 发表于 2022-3-23 19:40

加林森 发表于 2022-3-23 19:18
吃了就可以玩了。

就是,{:5_106:}和队长一起开心{:4_179:}
页: 1 2 [3]
查看完整版本: 《雪恋冬》 - 寂悸 TO:小九