楼主: 花简静

花简静贴子代码及说明汇总(翻页有新贴)

[复制链接]
一叶知秋 版主勋章 山高为峰 山外有山 樱果相依 24 46 47 48 闲花落
 楼主| 发表于 2024-5-19 16:58 | 显示全部楼层






点评
回复

使用道具

一叶知秋 版主勋章 山高为峰 山外有山 樱果相依 24 46 47 48 闲花落
 楼主| 发表于 2024-5-19 16:58 | 显示全部楼层
本帖最后由 花简静 于 2024-8-18 15:29 编辑

<style>     #papa { margin: 130px 0 20px calc(50% - 931px); width: 1700px; height: 900px; background: url('https://642303.freep.cn/642303/tu/qishansz06.webp') no-repeat center/cover; box-shadow: 3px 3px 6px rgba(0, 0, 0, .5); position: relative; }     #mama { position: absolute; width: 100%; height: 100%;mix-blend-mode: screen;opacity: .58; }     #background { display: none; }     #player { position: absolute; left: 490px; bottom: 280px; cursor: pointer; z-index: 100; opacity: .65; animation: rot 10s linear infinite var(--state); }     @keyframes rot { to { transform: rotate(1turn); } } </style>   <div id="papa">     <audio id="aud" src="https://music.163.com/song/media/outer/url?id=410161058" autoplay loop></audio>     <!-- mama是约束水珠的载体,它需要通过CSS设置为绝对定位 -->     <div id="mama"></div>     <img id="player" src="https://642303.freep.cn/642303/za/4yc0.png" width="120" height="120" alt="" /> </div>   <script>     var engine;     var sF = document.createElement('script');     sF.src = 'https://638183.freep.cn/638183/web/js/rainyday.js';     document.body.appendChild(sF);     sF.onload = function() {         var image = new Image();         image.crossOrigin = 'anonymous';         image.onload = function() {             engine = new RainyDay({                 image: this,                 parentElement: mama,             });             var canv = document.querySelector('#papa canvas');             canv.style.cssText += 'left: 0; top: 0';             mState();         };         //图片地址(需支持跨域)         image.src = 'https://642303.freep.cn/642303/tu/0513di.webp';             var mState = () => {             papa.style.setProperty('--state', aud.paused ? 'paused' : 'running');             aud.paused ? engine.pause() : engine.resume();         };         aud.onplaying = aud.onpause = () => mState();         player.onclick = () => aud.paused ? aud.play() : aud.pause();     }; </script> <br><br><br><br><br><br>
点评
回复

使用道具

一叶知秋 版主勋章 山高为峰 山外有山 樱果相依 24 46 47 48 闲花落
 楼主| 发表于 2024-5-23 21:20 | 显示全部楼层
点评
回复

使用道具

一叶知秋 版主勋章 山高为峰 山外有山 樱果相依 24 46 47 48 闲花落
 楼主| 发表于 2024-5-23 21:20 | 显示全部楼层
点评
回复

使用道具

一叶知秋 版主勋章 山高为峰 山外有山 樱果相依 24 46 47 48 闲花落
 楼主| 发表于 2024-5-23 21:20 | 显示全部楼层
点评
回复

使用道具

一叶知秋 版主勋章 山高为峰 山外有山 樱果相依 24 46 47 48 闲花落
 楼主| 发表于 2024-5-23 21:20 | 显示全部楼层
点评
回复

使用道具

一叶知秋 版主勋章 山高为峰 山外有山 樱果相依 24 46 47 48 闲花落
 楼主| 发表于 2024-5-23 21:20 | 显示全部楼层
点评
回复

使用道具

一叶知秋 版主勋章 山高为峰 山外有山 樱果相依 24 46 47 48 闲花落
 楼主| 发表于 2024-5-23 21:20 | 显示全部楼层
点评
回复

使用道具

一叶知秋 版主勋章 山高为峰 山外有山 樱果相依 24 46 47 48 闲花落
 楼主| 发表于 2024-5-23 21:20 | 显示全部楼层
点评
回复

使用道具

一叶知秋 版主勋章 山高为峰 山外有山 樱果相依 24 46 47 48 闲花落
 楼主| 发表于 2024-5-23 21:20 | 显示全部楼层
点评
回复

使用道具

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|千山论坛

GMT+8, 2024-9-21 02:34

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表