- UID
- 616
- 主题
- 回帖
- 0
- 精华
- 积分
- 28106
- 金币
- 枚
- 草籽
- 颗
- 鲜花
- 朵
- 注册时间
- 2023-11-16
- 最后登录
- 1970-1-1
|
<style>
@import 'https://638183.freep.cn/638183/web/css/tz01.css';
#pa { --offsetX: 0px; width: clamp(600px, 90vw, 1856px); height: auto; aspect-ratio: 18/9;margin: 150px 0;left: calc(50% - 81px);--bg: url('https://lengwx240511.oss-cn-shenzhen.aliyuncs.com/%E5%9B%BE%E5%9B%BE/2.jpg') no-repeat center/cover; --bg1: lightblue; --state: runnig; transition: 0.5s; --ma-size: 3%; --per: -2%; --a: 45deg; }
#pa::before { content: ''; position: absolute; inset: 0; background: var(--bg1); mask: linear-gradient(var(--a), red var(--per), transparent calc(var(--per) + 2%), transparent); }
#ma {left: 31%; top: 40%; background: url('https://642303.freep.cn/642303/za/fl1033.png') no-repeat center/cover;}
#btnFs { right: 20px; bottom: 20px; }
.qk-vid { mix-blend-mode:screen; opacity: .95;
webkit-mask: radial-gradient(transparent 20%, red);
-webkit-mask: radial-gradient(transparent 20%, red); }
</style>
<div id="pa">
<audio id="aud" src="https://music.163.com/song/media/outer/url?id=165839" autoplay loop></audio>
<video class="qk-vid" src="https://bpic.588ku.com/video_listen/588ku_video/22/11/05/16/14/20/video63661b5c8b098.mp4" autoplay loop muted></video>
<div id="ma" class="hue-rotate"></div>
</div>
<script type="module">
import { FS } from 'https://638183.freep.cn/638183/web/js/fullscreen.js';
FS(pa, ma);
var per = -2, step = 0.5, aniCounter = 0, raf;
var pics = [
'https://lengwx240511.oss-cn-shenzhen.aliyuncs.com/%E5%9B%BE%E5%9B%BE/2.jpg',
'https://lengwx240511.oss-cn-shenzhen.aliyuncs.com/%E5%9B%BE%E5%9B%BE/1.jpg',
'https://lengwx240511.oss-cn-shenzhen.aliyuncs.com/%E5%9B%BE%E5%9B%BE/3.jpg',
'https://lengwx240511.oss-cn-shenzhen.aliyuncs.com/%E5%9B%BE%E5%9B%BE/5.jpg',
];
ma.onanimationiteration = () => {
var angle = aniCounter % 24, picIdx = aniCounter % pics.length;
pa.style.setProperty('--a', `${180 + (angle * 90)}deg`);
pa.style.setProperty('--bg1', `url(${pics[picIdx]}) no-repeat center/cover`);
picIdx = (picIdx + 1) % pics.length;
aniCounter ++;
changePic();
};
function changePic() {
if (per > 100) {
cancelAnimationFrame(raf);
per = -2;
var picIdx = aniCounter % pics.length;
picIdx = picIdx > 0 ? picIdx - 1: pics.length - 1;
pa.style.setProperty('--bg', `url(${pics[picIdx]}) no-repeat center/cover`);
} else {
per += step;
pa.style.setProperty('--per', per + '%');
raf = requestAnimationFrame(changePic);
}
}
</script> |
|