【黑黑三星望月代码】立秋
本帖最后由 东篱闲人 于 2024-5-29 14:25 编辑 <br /><br /><style>#papa { margin: 20px 0 20px calc(50% - 721px); width: 1280px; height: 720px; background: lightblue; box-shadow: 2px 2px 6px #000; overflow: hidden; z-index: 1; position: relative; }
.vid { position: absolute; top: -70px; width: 100%; height: calc(100% + 70px); object-fit: cover; pointer-events: none; }
.vid:nth-of-type(2) { height: 60%; height: 60%; transform: rotate(-10deg); mix-blend-mode: screen; opacity: .5; }
.star { position: absolute; left: 300px; top: 40px; cursor: pointer; animation: ani 1.5s linear infinite alternate var(--state); }
.star:nth-of-type(2) { left: 480px; top: 160px; animation-delay: -.5s; }
.star:nth-of-type(3) { left: 600px; top: 10px; animation-delay: -1s; }
@keyframes ani { from { transform: rotate(-10deg) scale(.8); opacity: .2; } to { transform: rotate(10deg) scale(1.5); opacity: .9; } }
</style>
<div id="papa">
<audio id="aud" src="https://music.163.com/song/media/outer/url?id=1806871845" autoplay loop></audio>
<video class="vid" src="https://img.tukuppt.com/video_show/6181262/01/30/86/62cab55ce5928.mp4" loop muted></video>
<video class="vid" src="https://img.tukuppt.com/video_show/2269348/00/02/02/5b4efb7022208.mp4" loop muted></video>
<img class="star" alt="" src="https://638183.freep.cn/638183/t22/webp/star.webp" />
<img class="star" alt="" src="https://638183.freep.cn/638183/t22/webp/star.webp" />
<img class="star" alt="" src="https://638183.freep.cn/638183/t22/webp/star.webp" />
</div>
<script>
(function() {
const vids = document.querySelectorAll('.vid'), stars = document.querySelectorAll('.star');
aud.onplaying = aud.onpause = () => {
papa.style.setProperty('--state', aud.paused ? 'paused' : 'running');
vids.forEach( vid => aud.paused ? vid.pause() : vid.play());
stars.forEach(star => star.title = aud.paused ? '点击播放' : '点击暂停');
};
stars.forEach(star => star.onclick = () => aud.paused ? aud.play() : aud.pause());
})();
</script> 三颗星星真的挺闪耀的。 愤怒的葡萄 发表于 2024-5-29 14:43
三颗星星真的挺闪耀的。
黑黑的播放按钮。{:5_106:} 东篱闲人 发表于 2024-5-29 14:48
黑黑的播放按钮。
闲人兄也是盗用三颗星星啊。 愤怒的葡萄 发表于 2024-5-29 15:39
闲人兄也是盗用三颗星星啊。
嗯嗯嗯,盗亦有道。。。。。{:4_170:} 漂亮,这样的场景也是预示着人世间的岁月转换吧。
欣赏东篱大哥好帖{:4_187:} {:4_199:} 真棒!{:4_199:}
页:
[1]