Loading svg
How do I make an loading svg?
What is a loading svg? How do you make a loading svg? This script and codes were developed by Adem Ilter on 11 June 2022, Saturday.
Loading svg - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>loading svg</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="loading"> <svg xmlns="http://www.w3.org/2000/svg" width="124" height="124" viewBox="0 0 124 124"> <circle id="circle" class="circle-bg" cx="62" cy="62" r="59" /> <circle id="circle" class="circle-color" cx="62" cy="62" r="59" transform="rotate(-90 62 62)" /> <polyline id="check" class="check" points="73.56 48.63 57.88 72.69 49.38 62" /> </svg>
</div>
<button class="reload" role="button" onclick="run()">reload</button> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Loading svg - Script Codes CSS Codes
body { text-align: center; padding: 40px;
}
.reload { display: none;
}
.reload.show { margin-top: 20px; display: inline-block;
}
circle,
polyline { fill: none; stroke-width: 6px; stroke-linecap: round; stroke-linejoin: round;
}
.circle-bg { stroke: #eee;
}
.circle-color { stroke: #007AFF; stroke-dasharray: 380; stroke-dashoffset: 380;
}
.check { stroke: #007AFF; stroke-dasharray: 47; stroke-dashoffset: -46;
}
.loading.isComplated .check { stroke-dashoffset: 0; -webkit-transition: .5s; transition: .5s;
}
.loading { margin: 0 auto; font-size: 124px; width: 1em; height: 1em;
}
.loading svg { display: block; width: 100%; height: 100%;
}
Loading svg - Script Codes JS Codes
$loading = $(".loading");
var svgStrokeLength = 380;
function loading(percent, delay) { var percent = svgStrokeLength - (svgStrokeLength * percent / 100) $loading.find("circle.circle-color").animate({ 'stroke-dashoffset': percent }, delay, function() { if (percent == 0) { setTimeout(function() { $loading.addClass("isComplated"); $(".reload").addClass("show"); }, delay); } })
}
function run() { $loading.removeClass("isComplated"); $(".reload").removeClass("show"); $loading.find("circle.circle-color") .css('stroke-dashoffset', svgStrokeLength) loading(10, 200); loading(15, 600); loading(42, 1200); loading(55, 400); loading(86, 2000); loading(100, 100);
};
run();
Developer | Adem Ilter |
Username | ademilter |
Uploaded | June 11, 2022 |
Rating | 3 |
Size | 2,319 Kb |
Views | 125,488 |
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 |
Fluid width step-navigation | 1,918 Kb |
A Pen by Adem ilter | 3,546 Kb |
Pure CSS3 iPad Clock | 6,546 Kb |
Responsive table | 2,426 Kb |
Fake loading | 1,952 Kb |
404 No signal | 3,590 Kb |
Border box arrow | 2,700 Kb |
Circle loading | 2,932 Kb |
Timeline with css | 2,817 Kb |
Navigation Knob | 3,385 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 |
Loader | MikitaLisavets | 3,321 Kb |
Loading animation - freedom purchase | Rocbear | 2,567 Kb |
DNA Double Helix | Hugo | 5,112 Kb |
Headroom.js demo | WickyNilliams | 3,982 Kb |
Google Maps API Ground Overlay | Boycetrus | 2,961 Kb |
Awesome textarea | Ayoungh | 1,977 Kb |
Wavy Road with Dashes | Jonobr1 | 2,679 Kb |
Sexy Social Buttons | Ipiyale | 2,226 Kb |
Ionic Infinite outside ion-content with ion-pane | Felquis | 3,117 Kb |
Click Based Rotation Demo | Zeaklous | 2,086 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!