楼主: 凡哥

[碎语] 源码小屋

[复制链接]
一生安柠 青恬时光 幸福莓满 心想事橙 桃气满满 梅开颜笑 心若葡提 大吉大荔 樱果相依 喜上莓梢 一坛酒
 楼主| 发表于 2024-9-7 20:02 | 显示全部楼层
花简静 发表于 2024-9-7 19:21
今天这个图标有镂空,就很新鲜。。。能互动拖着玩就更新鲜。。

好玩吧
点评
回复

使用道具

一叶知秋 版主勋章 山高为峰 山外有山 樱果相依 24 46 47 48 闲花落
发表于 2024-9-7 20:25 | 显示全部楼层

看了 半天才知道它为啥镂空了
点评
回复

使用道具

一生安柠 青恬时光 幸福莓满 心想事橙 桃气满满 梅开颜笑 心若葡提 大吉大荔 樱果相依 喜上莓梢 一坛酒
 楼主| 发表于 2024-9-7 23:09 | 显示全部楼层
花简静 发表于 2024-9-7 20:25
看了 半天才知道它为啥镂空了

这个需要一点点悟性而已
点评
回复

使用道具

一生安柠 青恬时光 幸福莓满 心想事橙 桃气满满 梅开颜笑 心若葡提 大吉大荔 樱果相依 喜上莓梢 一坛酒
 楼主| 发表于 2024-9-8 09:29 | 显示全部楼层

2024年9月8日 星期日

晨光

<style>
#tz {
	margin: 30px 0 30px calc(50% - 602px);
	width: 1024px;
	height: 600px;
	background: url('https://638183.freep.cn/638183/t24/4/ifgl.jpg') no-repeat center/cover;
	box-shadow: 3px 3px 6px #333;
	display: grid;
	place-items: center;
	position: relative;
}
#player {
	--size: 120px;
	--border: 10px;
	position: absolute;;
	top: 25%;
	width: var(--size);
	height: var(--size);
	border-radius: 50%;
	cursor: pointer;
	animation: rot 8s linear infinite var(--state);
}
.infinity {
	width: 100%;
	height: 100%;
	filter: drop-shadow(0 0 10px black);
	position: absolute;
}
.infinity::before, .infinity::after {
	position: absolute;
	content: '';
	width: calc(50% - var(--border) * 1.5);
	height: calc(50% - var(--border) * 1.5);
	border: var(--border) solid teal;
	border-radius: 50% 50% 0 50%;
	transform-origin: 100% 100%;
}
.infinity::after { transform: rotate(-180deg) translate(var(--border), var(--border)); }
#vid {
	position: absolute;
	right: 0;
	top: 0;
	width: 100%;
	height: 20%;
	object-fit: cover;
	pointer-events: none;
	mix-blend-mode: hard-light;
	-webkit-mask: linear-gradient(red, transparent);
}
@keyframes rot { to { transform: rotate(1turn); } }
</style>

<div id="tz">
	<audio id="aud" src="https://music.163.com/song/media/outer/url?id=132675" autoplay loop></audio>
	<video id="vid" src="https://bpic.588ku.com/video_listen/588ku_preview/20/11/10/15/34/31/video5faa42876fc28.mp4" autoplay loop muted></video>
	<div id="player"></div>
</div>


<script>
var draggable = false, offset = 80, time_delay = 0;
var sc = document.createElement('script');
sc.src = 'https://638183.freep.cn/638183/web/api/fullscreen.js';
sc.charset = 'utf-8';
document.body.appendChild(sc);
sc.onload = () => FS({
	papa: '#tz',
	css: 'bottom: 20px; --fsBg: transparent; --color: white;',
});
Array(total = 3).fill('').forEach((el,k) => {
	el = document.createElement('div');
	el.className = 'infinity';
	el.style.transform = `rotate(${360 / total * k}deg)`;
	player.appendChild(el);
});
aud.onplaying = aud.onpause = () => {
	tz.style.setProperty('--state', aud.paused ? 'paused' : 'running');
	aud.paused ? vid.pause() : vid.play();
}
player.onclick = () => aud.paused ? aud.play() : aud.pause();
</script>
点评
回复

使用道具

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

本版积分规则

手机版|千山论坛

GMT+8, 2024-9-8 12:43

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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