楼主: 花简静

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

[复制链接]
 楼主| 发表于 2024-10-10 20:43 | 显示全部楼层
点评
回复

使用道具

 楼主| 发表于 2024-10-10 20:43 | 显示全部楼层
本帖最后由 花简静 于 2024-12-22 22:00 编辑

<style>     #dbox {     margin:130px 0 30px calc(50% - 931px);     width: 1700px;     height: 900px;     background: url('https://642303.freep.cn/642303/tu/20241009hkbaqs.webp') no-repeat center/cover;     border-radius: 6px;     box-shadow: 3px 3px 8px gray;     position: relative;     overflow: hidden; }     #vid {         position: absolute;         width: 110%;         height: 110%;         object-fit: cover;         left:-6%;         top:-4%;         mix-blend-mode:screen;         pointer-events: none;         opacity: 0.79;         -webkit-mask: linear-gradient(to bottom,transparent,red,red); }     #msvg { position: absolute; right: 480px; bottom:340px; }     #cpath { cursor: pointer; filter: drop-shadow(0 0 4px #000); transform-origin: 50%; animation: rot 6s linear infinite var(--state), chgcolor 12s linear infinite alternate var(--state); }     @keyframes rot { to { transform: rotate(360deg); stroke-dashoffset: -160; } }     @keyframes chgcolor { to { fill: rgba(210,105,30,.1); } } </style>   <div id="dbox"> <video id="vid" src="https://img.tukuppt.com/video_show/15653652/00/79/86/60c98c8146068.mp4" autoplay loop muted></video>     <audio id="aud" src="https://music.163.com/song/media/outer/url?id=1461351717" autoplay loop></audio>         <svg id="msvg" width="200" height="200">         <defs>             <g id="cpath" fill="rgba(210,105,30,.15)" stroke="rgba(255,255,255,.8)" stroke-width="4" stroke-dasharray="4">                 <path d='M100 120 C10 -30,190 -30,100 120'/>             </g>         </defs>     </svg> </div>   <script>     mState = () => {         dbox.style.setProperty('--state', aud.paused ? 'paused' : 'running');         aud.paused ? (msvg.pauseAnimations(), vid.pause()) : (msvg.unpauseAnimations(), vid.play());     }     mkLeaves = (total) => {         let str = '';         Array(total).fill().forEach((_,idx) => {             str += `<use href="#cpath" transform="rotate(${360 / total * idx} 100 100)"/>`;         });         return str;     };     msvg.innerHTML += mkLeaves(5);     aud.onplaying = aud.onpause = () => mState();     msvg.onclick = () => aud.paused ? aud.play() : aud.pause(); </script>
点评
回复

使用道具

 楼主| 发表于 2024-10-14 22:06 | 显示全部楼层
点评
回复

使用道具

 楼主| 发表于 2024-10-14 22:06 | 显示全部楼层
点评
回复

使用道具

 楼主| 发表于 2024-10-14 22:06 | 显示全部楼层
点评
回复

使用道具

 楼主| 发表于 2024-10-14 22:06 | 显示全部楼层
点评
回复

使用道具

 楼主| 发表于 2024-10-14 22:06 | 显示全部楼层
点评
回复

使用道具

 楼主| 发表于 2024-10-14 22:06 | 显示全部楼层
点评
回复

使用道具

 楼主| 发表于 2024-10-14 22:07 | 显示全部楼层
点评
回复

使用道具

 楼主| 发表于 2024-10-14 22:07 | 显示全部楼层
点评
回复

使用道具

您需要登录后才可以回帖 登录 | 中文注册

本版积分规则

手机版|千山论坛 ( 冀ICP备2024055714号 )

GMT+8, 2025-9-18 19:19

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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