楼主: 凡哥

[碎语] 源码小屋

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

使用道具

发表于 2024-10-5 20:50 | 显示全部楼层
凡哥 发表于 2024-10-5 19:56
斗鸡眼的数学都好

理科生斗鸡眼多
点评
回复

使用道具

发表于 2024-10-5 20:55 | 显示全部楼层
凡哥 发表于 2024-10-5 20:03
2024年10月5日 星期六
The Promise

这个小播漂亮,又是火星配色
点评
回复

使用道具

 楼主| 发表于 2024-10-5 21:43 | 显示全部楼层
花简静 发表于 2024-10-5 20:55
这个小播漂亮,又是火星配色

小播生成程序明天发
点评
回复

使用道具

 楼主| 发表于 2024-10-5 21:43 | 显示全部楼层

大概如此
点评
回复

使用道具

发表于 2024-10-6 18:16 | 显示全部楼层
凡哥 发表于 2024-10-5 21:43
小播生成程序明天发

看到了,工具小 功能强大。。
点评
回复

使用道具

发表于 2024-10-6 18:17 | 显示全部楼层

我说的是不讲理的那科
点评
回复

使用道具

 楼主| 发表于 2024-10-7 08:21 | 显示全部楼层

2024年10月7日 星期一

Analogue Dreams

<style>
#mama {
	margin: 30px 0 30px calc(50% - 602px);
	width: 1024px;
	height: 640px;
	background: url('https://638183.freep.cn/638183/t24/webp2/dreams.webp') no-repeat center/cover;
	border-radius: 6px;
	box-shadow: 3px 3px 8px gray;
	position: relative;
}
#bsvg {
	position: absolute;
	border-radius: 6px;
}
#player {
	--deg: 4turn;
	cursor: pointer;
	transform-origin: 512px 400px;
	animation: rot 10s linear infinite alternate var(--state);
}
#player:hover {
	--deg: 2turn;
}
.linepath {
	stroke-dasharray: 1664;
	animation: draw 10s linear infinite alternate var(--state);
}
@keyframes draw {
	from { stroke-dashoffset: 1664; }
	to { stroke-dashoffset: 0; }
}
@keyframes erase {
	from { stroke-dashoffset: 0; }
	to { stroke-dashoffset: 1664; }
}
@keyframes rot { to { transform: rotate(var(--deg)); } }
</style>

<div id="mama">
	<audio id="aud" src="https://music.163.com/song/media/outer/url?id=41667693" autoplay loop></audio>
	<svg id="bsvg" width="100%" height="100%" fill="none" stroke="green" stroke-width="10" stroke-lineCap="round">
		<defs>
			<g id="cpath" fill="rgba(0,100,100,.25)" stroke="yellow" stroke-width="2">
				<title id="ctrMsg">播放/暂停</title>
				<path d="M100 120,C-10 -30,210 -30,100 120"/>
				<path d="M100 120,C-10 -30,210 -30,100 120" transform="rotate(72 100 100)"/>
				<path d="M100 120,C-10 -30,210 -30,100 120" transform="rotate(144 100 100)"/>
				<path d="M100 120,C-10 -30,210 -30,100 120" transform="rotate(216 100 100)"/>
				<path d="M100 120,C-10 -30,210 -30,100 120" transform="rotate(288 100 100)"/>
			</g>
		</defs>
		<rect x="0" y="0" width="100%" height="100%" stroke="rgba(0,0,0,.2)"/>
		<path class="linepath" d="M0 0 H1024 V640" />
		<path class="linepath" d="M1024 640 H0 V0" />
		<ellipse cx="512" cy="550" rx="80" ry="30" stroke="none" fill="rgba(0,100,100,.35)"/>
		<rect x="506" y="400" width="12" height="150" stroke="none" fill="rgba(0,100,100,.25)"/>
		<use id="player" href="#cpath" x="412" y="300" width="200" height="200"/>
	</svg>
</div>

<script>
mState = () => {
	mama.style.setProperty('--state', aud.paused ? 'paused' : 'running');
	ctrMsg.textContent = aud.paused ? '点击播放' : '点击暂停';
};
aud.onplaying = aud.onpause = () => mState();
player.onclick = () => aud.paused ? aud.play() : aud.pause();
</script>

评分

1

查看全部评分

点评
回复

使用道具

 楼主| 发表于 2024-10-8 12:04 | 显示全部楼层
花简静 发表于 2024-10-6 18:17
我说的是不讲理的那科

无理科就是相当于文科吧
点评
回复

使用道具

 楼主| 发表于 2024-10-8 12:09 | 显示全部楼层

2024年10月8日 星期二

逃离

<style>
#tz {
	margin: 30px 0px 30px calc(50% - 721px);
	width: 1280px;
	height: 600px;
	background: blue url('https://638183.freep.cn/638183/t24/4/escape.jpg') no-repeat center/cover;
	box-shadow: 3px 3px 6px rgba(0,0,0,.6);
	position:relative;
}
#player {
	position: absolute;
	bottom: 20px;
	left: calc(50% - 50px);
	animation: rot 8s linear infinite var(--state);
}
.waves {
	position: absolute;
	bottom: 0;
	width: 100%;
	height: 50%;
}
.wavegroup > use {
	animation: waving 25s cubic-bezier(.55,.5,.45,.5) infinite var(--state);
}
.wavegroup > use:nth-child(1) {
	animation-delay: -2s;
	animation-duration: 7s;
}
.wavegroup > use:nth-child(2) {
	animation-delay: -3s;
	animation-duration: 10s;
}
.wavegroup > use:nth-child(3) {
	animation-delay: -4s;
	animation-duration: 13s;
}
.wavegroup > use:nth-child(4) {
	animation-delay: -5s;
	animation-duration: 30s;
}
@keyframes waving {
	0% { transform: translate3d(-90px,0,0); }
	100% { transform: translate3d(85px,0,0); }
}
@keyframes rot {
	to { transform: rotate(360deg); filter: hue-rotate(360deg); }
}
</style>

<div id="tz">
	<audio id="aud" src="https://music.163.com/song/media/outer/url?id=1397231580" autoplay loop></audio>
	<svg class="waves" viewBox="0 24 150 28" xmlns="http://www.w3.org/2000/svg">
		<defs>
			<path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z" />
		</defs>
		<g class="wavegroup">
			<use xlink:href="#gentle-wave" x="48" y="0" fill="rgba(255,255,255,0.4" />
			<use xlink:href="#gentle-wave" x="48" y="3" fill="rgba(255,255,255,0.3)" />
			<use xlink:href="#gentle-wave" x="48" y="5" fill="rgba(255,255,255,0.2)" />
			<use xlink:href="#gentle-wave" x="48" y="7" fill="rgba(255,255,255,0.1" />
		</g>
	</svg>
	<img id="player" src="https://638183.freep.cn/638183/web/svg/p2.svg" atl="" title="play" />
</div>

<script>
mState = () => {
	tz.style.setProperty('--state', aud.paused ? 'paused' : 'running');
	player.title = aud.paused ? '点击播放' : '点击暂停';
};
aud.onplaying = aud.onpause = () => mState();
player.onclick = () => aud.paused ? aud.play() : aud.pause();
</script>
点评
回复

使用道具

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

本版积分规则

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

GMT+8, 2025-9-15 19:16

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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