SVG Animation - Circle Fill
How do I make an svg animation - circle fill?
Click the buttons to fill/un-fill the circular path. What is a svg animation - circle fill? How do you make a svg animation - circle fill? This script and codes were developed by Adam Grayson on 10 November 2022, Thursday.
SVG Animation - Circle Fill - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>SVG Animation - Circle Fill</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="circle"> <svg class="circleFill"> <circle cx="43" cy="43" r="39" stroke="#888888" stroke-width="6" fill="none"></circle> </svg> <svg class="circleTrack"> <circle cx="43" cy="43" r="39" stroke="#cccccc" stroke-width="6" fill="none"></circle> </svg>
</div>
<div class="fillBtn">Fill</div>
<div class="unfillBtn">Unfill</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
SVG Animation - Circle Fill - Script Codes CSS Codes
html, body { font-family: "Helvetica", helvetica, sans-serif;
}
.circle { position: relative; width: 85px; height: 85px; margin: 20px auto;
}
.circle svg { position: absolute; width: 100%; height: 100%;
}
.circle svg.circleFill { z-index: 1; stroke-dasharray: 322; stroke-dashoffset: 322; -webkit-transition: all 3s; transition: all 3s; -webkit-transform: rotate(-90deg); transform: rotate(-90deg);
}
.circle svg.circleFill.filled { stroke-dashoffset: 38.5;
}
.circle svg.circleTrack { z-index: 0;
}
.fillBtn,
.unfillBtn { width: 150px; padding: 10px 0; margin: 20px auto; text-align: center; background: #cccccc; color: #888888; border-radius: 4px; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
}
.fillBtn:hover,
.unfillBtn:hover { color: #ffffff; cursor: pointer;
}
SVG Animation - Circle Fill - Script Codes JS Codes
(function() { $(document).ready(function() { var animPolice, animTime; animTime = 3000; animPolice = false; $('.fillBtn').click(function() { if (animPolice) { return; } animPolice = true; $(".circleFill").attr("class", "circleFill filled"); return setTimeout(function() { return animPolice = false; }, animTime); }); return $('.unfillBtn').click(function() { if (animPolice) { return; } animPolice = true; $(".circleFill").attr("class", "circleFill"); return setTimeout(function() { return animPolice = false; }, animTime); }); });
}).call(this);
Developer | Adam Grayson |
Username | agrayson |
Uploaded | November 10, 2022 |
Rating | 4.5 |
Size | 3,322 Kb |
Views | 46,552 |
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 |
Responsive square grid in pure CSS | 2,140 Kb |
Drag and Drop File Preview | 3,444 Kb |
Dynamic circle menus with SASS | 3,928 Kb |
CCS3 Navigation Hover Effect | 1,953 Kb |
RPG Cooldown | 2,902 Kb |
Circle Progression Plugin | 2,612 Kb |
Custom Select Element | 3,616 Kb |
Random Weapon Generator | 4,209 Kb |
Responsive Carousel | 3,291 Kb |
Custom Event Policing | 3,255 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 |
Responsive Menu I | Rodericksandoval | 3,045 Kb |
Particle Motion trajectories | Sniejadlik | 5,899 Kb |
Fluid Grid 12 | Alexoliverwd | 2,309 Kb |
A Pen by lizz | Lizz | 10,068 Kb |
Parallax-ish Sliding Content | Jdsteinbach | 2,748 Kb |
Button fills | Zubfatal | 5,205 Kb |
A cube | KyleDavidE | 18,627 Kb |
Vue.js Starter | Andymerskin | 1,268 Kb |
Wip elementary os navbar | Nickcolley | 2,993 Kb |
Classy Blockquote Styling | Andrewwright | 3,212 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!