Sun Animation
How do I make an sun animation?
SUN svg animation with CSS. What is a sun animation? How do you make a sun animation? This script and codes were developed by Benedikte Vanderweeën on 21 January 2023, Saturday.
Sun Animation - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Sun Animation</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="container-sun">
<svg class="svg-sun" version="1.1" viewBox="0 0 100 100" preserveAspectRatio="xMinYMin meet">
<circle cx="50" cy="50" r="35" id="sun"></circle>
</svg>
</div>
</body>
</html>
Sun Animation - Script Codes CSS Codes
body{ background-color: #2980b9;
}
.container-sun{ text-align:center;
}
/* the svg element */
.svg-sun{ width:300px; height:300px; -webkit-transform-origin: center center; -moz-transform-origin: 50% 50%; -o-transform-origin: center center; -ms-transform-origin: center center; transform-origin:50% 50%;
-webkit-animation: spin 25s linear infinite, sun-glow 3s 0s linear infinite;
-moz-animation: spin 25s linear infinite, sun-glow 3s 0s linear infinite;
-o-animation:spin 25s linear infinite, sun-glow 3s 0s linear infinite;
-ms-animation: spin 25s linear infinite, sun-glow 3s 0s ease-in-out infinite;
animation: spin 25s linear infinite,sun-glow 3s 0s linear infinite;
}
/* the circle element in the svg itself */
#sun{ stroke-width:18; stroke-dasharray:2; stroke-dashoffset:2;
}
/* animation for the sun glowing effect */
@-webkit-keyframes sun-glow { 0% { fill: #f1c40f; stroke:#f1c40f;} 50% { fill: #e67e22; stroke:#e67e22;} 100% { fill: #f1c40f; stroke:#f1c40f;}
}
@-moz-keyframes sun-glow { 0% { fill: #f1c40f; stroke:#f1c40f;} 50% { fill: #e67e22; stroke:#e67e22;} 100% { fill: #f1c40f; stroke:#f1c40f;}
}
@-o-keyframes sun-glow { 0% { fill: #f1c40f; stroke:#f1c40f;} 50% { fill: #e67e22; stroke:#e67e22;} 100% { fill: #f1c40f; stroke:#f1c40f;}
}
@-ms-keyframes sun-glow { 0% { fill: #f1c40f; stroke:#f1c40f;} 50% { fill: #e67e22; stroke:#e67e22;} 100% { fill: #f1c40f; stroke:#f1c40f;}
}
@keyframes sun-glow { 0% { fill: #f1c40f; stroke:#f1c40f;} 50% { fill: #e67e22; stroke:#e67e22;} 100% { fill: #f1c40f; stroke:#f1c40f;}
}
/* start spin animation */
@-webkit-keyframes spin{ 100% { -webkit-transform: rotate(360deg); }
}
@-moz-keyframes spin{ 100% { -moz-transform: rotate(360deg); }
}
@-o-keyframes spin{ 100% { -o-transform: rotate(360deg); }
}
@-ms-keyframes spin{ 100% { -ms-transform: rotate(360deg); }
}
@keyframes spin{ 100% { transform: rotate(360deg); }
}
Developer | Benedikte Vanderweeën |
Username | Benedikte |
Uploaded | January 21, 2023 |
Rating | 3.5 |
Size | 1,879 Kb |
Views | 2,024 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Pure CSS One Div Weather Animated Icons | 4,519 Kb |
Donut graph animation | 2,333 Kb |
Scaled Paper icon | 2,995 Kb |
Rotating earth with people | 5,790 Kb |
Transparent SVG pattern | 1,453 Kb |
Europe | 15,962 Kb |
Background SVG Gradients | 1,748 Kb |
Illustrio interface | 22,962 Kb |
Swimming fish | 2,446 Kb |
SVG Logo | 2,374 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Electric worm | Jeffibacache | 2,377 Kb |
SVG Playground | Roygwells | 1,834 Kb |
Side Sliding Menu CSS | EduardL | 4,388 Kb |
FontAwesome icons with animation | Nicotinell | 2,083 Kb |
Scarlett Johansson Tribute Page | Diomed | 3,233 Kb |
Flexbox playground | Enxaneta | 5,418 Kb |
Bootstrap 4 Gridsystem Demo | Rivella50 | 1,535 Kb |
Simple CSS loader. | Cabrera | 2,574 Kb |
React TODO | Enieste | 3,320 Kb |
Pruebas de d3.js | Juanmanuelcarnerero | 2,485 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!