Use SVG for preloader
See original GitHub issueNo but seriously to have the tipical preloader of Material Design you :
<div class="preloader-wrapper big active">
<div class="spinner-layer spinner-blue">
<div class="circle-clipper left">
<div class="circle"></div>
</div><div class="gap-patch">
<div class="circle"></div>
</div><div class="circle-clipper right">
<div class="circle"></div>
</div>
</div>
<div class="spinner-layer spinner-red">
<div class="circle-clipper left">
<div class="circle"></div>
</div><div class="gap-patch">
<div class="circle"></div>
</div><div class="circle-clipper right">
<div class="circle"></div>
</div>
</div>
<div class="spinner-layer spinner-yellow">
<div class="circle-clipper left">
<div class="circle"></div>
</div><div class="gap-patch">
<div class="circle"></div>
</div><div class="circle-clipper right">
<div class="circle"></div>
</div>
</div>
<div class="spinner-layer spinner-green">
<div class="circle-clipper left">
<div class="circle"></div>
</div><div class="gap-patch">
<div class="circle"></div>
</div><div class="circle-clipper right">
<div class="circle"></div>
</div>
</div>
</div>
Official web framework of Google (MDL) just offers one line to have the preloader not 40. Animate it with JS or CSS 3 animations or something, I don’t know what but this is not serious …
Issue Analytics
- State:
- Created 7 years ago
- Reactions:7
- Comments:9 (3 by maintainers)
Top Results From Across the Web
How to Create a Loader Icon With SVG Animation
In this tutorial you're going to learn how to make a very simple loader icon using SVG animation. What we'll be covering is...
Read more >Preloader Screen for Website HTML CSS SVG and JavaScript
Preloading screen animation with gear icon for website.This tutorial video to learn how to create Preloading screen for website using HTML, ...
Read more >svg-loader: A Different Way to Work With External SVG
Simply put, it fetches the SVG files via XHR and loads them as inline elements, allowing you to customize the properties like fill...
Read more >How to preload an SVG image properly? - Stack Overflow
I'm trying to preload an SVG logo ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
MDL does basically the same thing but uses javascript. Less code is, in this case, just a matter of perception. The Materialize spinner can at least be shown before any JS is loaded.
Here is one with SVG and CSS (not from me): https://codepen.io/mrrocks/pen/EiplA
But I’m not sure about browser compatibility in this case. Materialize spinner is at least compatible with anything out there, afaik. That’s fine IMO. 😃
BUT: I’ve also brought it down to
<md-progress type="circular"></md-progress>
in the framework I use. 😄I can sympathize with the HTML markup being too long, however we are already using CSS to animate it and using JS to animate it would be worse.
The SVG route might be a god fix for this. However the Codepen @Thanood provided seems to have an animation bug. If anyone is willing to take a look and can fix this, we can hopefully get a change in one of the next few versions.