使用Python的turtle库
```python
import turtle
import random
设置画布大小和背景颜色
turtle.setup(800, 800)
turtle.bgcolor("black")
设置画笔属性
turtle.color("white")
turtle.penup()
雪花形状
snowflake = [
(90, 60), (-135, 120), (60, 120), (-135, 60),
(90, 0), (-135, 0), (90, 60)
]
绘制雪花
for _ in range(30):
x = random.randint(-400, 400)
y = random.randint(-400, 400)
turtle.goto(x, y)
turtle.pendown()
for angle, length in snowflake:
turtle.setheading(angle)
turtle.forward(length)
turtle.penup()
关闭画布
turtle.done()
```
使用JavaScript和jQuery
```html