-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeteor.html
36 lines (36 loc) · 1.14 KB
/
meteor.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<html>
<head>
<title>Meteor Shower Animation</title>
</head>
<body>
<svg width="1000" height="1000">
<defs>
<path id="meteor" d="M10,10 L30,50 L70,50 L45,70 L55,30 L90,40 L60,10 L75,90 L25,90 L40,60 Z" />
<linearGradient id="gradient" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="#ff0000" stop-opacity="1" />
<stop offset="1" stop-color="#000000" stop-opacity="0" />
</linearGradient>
</defs>
<rect x="0" y="0" width="1000" height="1000" fill="#000000" />
<g id="meteors" style="z-index: 1;">
<use xlink:href="#meteor" fill="url(#gradient)" transform="scale(100) translate(475,-2000)" />
<animateTransform
attributeName="transform"
type="translate"
from="475,-2000"
to="475,800"
dur="5s"
begin="0s"
fill="freeze" />
</g>
<animate
xlink:href="#meteors"
attributeName="transform"
begin="0s"
dur="6s"
repeatCount="indefinite">
<randomize values="-1000;1000;-500;500;-100;100;0" />
</animate>
</svg>
</body>
</html>