楼主: 凡哥

[碎语] 源码小屋

[复制链接]
一生安柠 青恬时光 幸福莓满 心想事橙 桃气满满 梅开颜笑 心若葡提 大吉大荔 樱果相依 喜上莓梢 一坛酒
 楼主| 发表于 2024-7-27 19:45 | 显示全部楼层

2024年7月27日 星期六

<style>
#mydiv {
	margin: 230px 0 30px calc(50% - 602px);
	width: 1024px;
	height: 640px;
	background: url('https://638183.freep.cn/638183/t24/3/origin.jpg') no-repeat center/cover;
	box-shadow: 0 0 6px rgba(0,0,0,.6);
	overflow: hidden;
	z-index: 1;
	display: grid;
	place-items: center;
	position: relative;
}
#mydiv::before {
	position: absolute;
	content: '';
	inset: -100px;
	background: repeating-conic-gradient(at 50px 50px , transparent 0%, rgba(0,255,255,.25) 4%, transparent 8%);
	transform-origin: 50px 50px;
	animation: swear 5s infinite alternate var(--state);
}
#player {
	position: absolute;
	width: 200px;
	height: 200px;
	border-radius: 50%;
	border: 12px double rgba(55,144,177,.7);
	cursor: pointer;
	animation: rot 12s linear infinite var(--state);
}
#player::before, #player::after {
	position: absolute;
	content: '';
	border-radius: inherit;
	border: inherit;
}
#player::before {
	inset: 12px;
	border-style: double solid;
	border-color: rgba(68,205,241,.65);
}
#player::after { inset: 48px; border-style: dotted; }
li-zi {
	position: absolute;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	box-shadow: inset 0 0 10px lightblue;
	animation: up 4s linear infinite var(--state);
}
@keyframes swear {
	from { transform: rotate(-6deg); }
	to { transform: rotate(6deg); }
}
@keyframes rot { to { transform: rotate(1turn); } }
@keyframes up {
	to { transform: translateY(var(--yy)); opacity: 0; }
}
</style>

<div id="mydiv">
	<audio id="aud" src="https://music.163.com/song/media/outer/url?id=2053239064" autoplay loop></audio>
	<div id="player"></div>
</div>

<script>
Array.from({length: 60}).forEach(i => {
	i = document.createElement('li-zi');
	i.style.cssText += `
		left: ${50 + Math.floor(Math.random() * 100)}px;
		top: 95px;
		background: #${Math.random().toString(16).substring(2,8)};
		animation-delay: -${Math.random() * 4}s;
		--yy: ${500 * [1,-1][Math.round(Math.random())]}px;
	`;
	player.appendChild(i);
});
aud.oncanplay = aud.onplaying = aud.onpause = () => mydiv.style.setProperty('--state', aud.paused ? 'paused' : 'running');
player.onclick = () => aud.paused ? aud.play() : aud.pause();
</script>

评分

1

查看全部评分

点评
回复

使用道具

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

应该的,为人民币服务
点评
回复

使用道具

一生安柠 青恬时光 幸福莓满 心想事橙 桃气满满 梅开颜笑 心若葡提 大吉大荔 樱果相依 喜上莓梢 一坛酒
 楼主| 发表于 2024-7-27 21:31 | 显示全部楼层
花简静 发表于 2024-7-27 20:20
应该的,为人民币服务

捡瓶子呀
点评
回复

使用道具

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

一会儿就出去捡。哈哈。。
点评
回复

使用道具

一生安柠 青恬时光 幸福莓满 心想事橙 桃气满满 梅开颜笑 心若葡提 大吉大荔 樱果相依 喜上莓梢 一坛酒
 楼主| 发表于 2024-7-28 11:03 | 显示全部楼层
花简静 发表于 2024-7-28 10:49
一会儿就出去捡。哈哈。。

补贴家用,木有办法
点评
回复

使用道具

一叶知秋 版主勋章 山高为峰 山外有山 樱果相依 24 46 47 48 闲花落
发表于 2024-7-28 16:22 | 显示全部楼层
凡哥 发表于 2024-7-28 11:03
补贴家用,木有办法

同感,刚奋斗回来,哈哈。
点评
回复

使用道具

一生安柠 青恬时光 幸福莓满 心想事橙 桃气满满 梅开颜笑 心若葡提 大吉大荔 樱果相依 喜上莓梢 一坛酒
 楼主| 发表于 2024-7-28 20:35 | 显示全部楼层
花简静 发表于 2024-7-28 16:22
同感,刚奋斗回来,哈哈。

今天丰收
点评
回复

使用道具

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

那要庆贺一番来一杯
点评
回复

使用道具

一生安柠 青恬时光 幸福莓满 心想事橙 桃气满满 梅开颜笑 心若葡提 大吉大荔 樱果相依 喜上莓梢 一坛酒
 楼主| 发表于 2024-7-28 22:34 | 显示全部楼层
花简静 发表于 2024-7-28 22:34
那要庆贺一番来一杯

算了,别浪费,留点钱明天买米下锅
点评
回复

使用道具

一叶知秋 版主勋章 山高为峰 山外有山 樱果相依 24 46 47 48 闲花落
发表于 2024-7-28 22:44 | 显示全部楼层
凡哥 发表于 2024-7-28 22:34
算了,别浪费,留点钱明天买米下锅

太会过日子了。。
点评
回复

使用道具

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

本版积分规则

手机版|千山论坛

GMT+8, 2024-9-20 13:38

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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