forked from daftcreations/SVG-Animation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSVG Animation.html
43 lines (38 loc) · 1.13 KB
/
SVG Animation.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
37
38
39
40
41
42
43
<html>
<head>
<style>
body{
margin:0px;
background:radial-gradient(#25b1a8,#1f9aa2);
}
svg{
position:fixed;
top:30%;
left:23%;
height:60%;
width:60%;
}
</style>
</head>
<body>
<svg viewBox="0 0 160 160" width="160" height="160">
<defs>
<clipPath id="circle1">
<circle cx="80" cy="80" r="100"/>
</clipPath>
</defs>
<image width="120" height="120" xlink:href="planet.png" clip-path="url(#circle1)"/>
<g transform="matrix(0.866, -0.5, 0.25, 0.433, 80, 60)">
<path d="M 0,75 A 65,70 0 0,0 65,0 5,5 0 0,1 75,0 75,70 0 0,1 0,75Z" fill="#fff">
<animateTransform attributeName="transform" type="rotate" from="360 0 0" to="0 0 0" dur="1s" repeatCount="indefinite"/>
</path>
</g>
<defs>
<clipPath id="circle2">
<path d="M 80, 0 A 70, 70 0 0, 0 -80,0Z" transform="matrix(0.866, -0.5, 0.25, 0.433, 80, 60)"/>
</clipPath>
</defs>
<image width="120" height="120" xlink:href="planet.png" clip-path="url(#circle2)"/>
</svg>
</body>
</html>