Files
2026-03-10 11:48:50 -05:00

31 lines
758 B
TypeScript

"use client";
/**
* 纯 CSS 粒子背景 - 不依赖 @tsparticles
*/
export function ParticleBackground() {
const dots = Array.from({ length: 30 }, (_, i) => i);
return (
<div
className="absolute inset-0 pointer-events-none overflow-hidden"
aria-hidden
>
{dots.map((i) => (
<div
key={i}
className="absolute rounded-full bg-[var(--accent)] opacity-[0.08] animate-pulse"
style={{
width: `${2 + (i % 4)}px`,
height: `${2 + (i % 4)}px`,
left: `${(i * 7) % 100}%`,
top: `${(i * 11) % 100}%`,
animationDelay: `${(i % 5) * 0.5}s`,
animationDuration: `${2 + (i % 3)}s`,
}}
/>
))}
</div>
);
}