加林森 发表于 2021-12-16 20:09

本帖最后由 加林森 于 2022-5-4 18:34 编辑 <br /><br />红影 发表于 2021-12-16 19:44
悠闲的夜晚,继续来听歌。
就是就是,还是听歌舒服。

<style>
.outer { left: -214px; width: 1024px; height: 700px; background: linear-gradient(45deg, red, green), url('https://pic.imgdb.cn/item/6272533c09475431293abcae.png') no-repeat center/cover; background-blend-mode: overlay, normal; filter: drop-shadow(0 0 10px gray); opacity: .95; position: relative; }
.outer h2 { margin: 0; position: absolute; left: 80%; top: 10px; font: bold 2em sans-serif; color: teal; text-shadow: 1px 1px 2px #222; }
.spic { position: absolute; width: 600px; height: 600px; top: 100px; mix-blend-mode: multiply; }
.r-small { position: absolute; width: 100px; height: 100px; border-radius: 50%; top: calc(100% - 120px); left: calc(100% - 120px); cursor: pointer; text-align: center; animation: rot 6s linear infinite; }
@keyframes rot { to { transform: rotate(1turn); } }
</style>

<div class="outer">
        <h2>爱情的秋天</h2>
        <img class="spic" src="https://pic.imgdb.cn/item/62725692094754312943ac11.jpg" alt="" />
        <div class="outer r-small"></div>
</div>

<script>
let flag = true;
let ele = document.querySelector('.r-small');
let au = document.createElement('audio');
au.src = 'http://aod.cos.tx.xmcdn.com/group43/M0B/6E/36/wKgKklsRQHGi_D_UAB9TxLcyxpE560.mp3';
au.loop = true;
au.autoplay = flag;
au.style.display = 'none';
ele.appendChild(au);
if(!flag) ele.style.animationPlayState = 'paused';
ele.onclick = function() { flag ? (au.pause(), this.style.animationPlayState = 'paused', flag = false) : (au.play(), this.style.animationPlayState = 'running', flag = true); }
</script>
页: 1 [2]
查看完整版本: 《青青河边草 》-- 高胜美 送大家!