ai制作白色多边形背景
body {
margin: 0;
height: 100vh;
background: white;
overflow: hidden;
.polygon {
position: absolute;
width: 100px;
height: 100px;
background: rgba(255,255,255,0.8);
clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
animation: float 15s infinite linear;
keyframes float {
0% { transform: translateY(0) rotate(0deg); }
100% { transform: translateY(-100vh) rotate(360deg); }
for(let i=0; i<20; i++) {
const poly = document.createElement('div');
poly.className = 'polygon';
poly.style.left = Math.random100 + 'vw';
poly.style.top = Math.random100 + 'vh';
poly.style.width = (Math.random100 + 50) + 'px';
poly.style.height = poly.style.width;
poly.style.animationDuration = (Math.random10 + 10) + 's';
document.body.appendChild(poly);