A CSS only solution that recreates the Material Design preloader; or, who needs jQuery anyway?
You should set aria-busy
to false
when your stuff is loaded.
Primarily tested in Safari 8 with VoiceOver on OS X 10.10 Yosemite.
- Firefox 33 on OS X 10.10 Yosemite
- Firefox 16 on OS X 10.10 Yosemite
- Chrome 38 on OS X 10.10 Yosemite
- Internet Explorer 11 on Windows 7
- Internet Explorer 10 on Windows 7
- Anything that support ARIA attributes, well, for screen reader users anyway ;)
You could load a fallback animated gif.
- Anything that doesn't support
keyframes
A thank you to Aaron Lumsden, who created a JavaScript version.
A Pen by Michiel Bijl on CodePen.