Default
31 | 32 |<div class="spinner" role="progressbar" aria-valuetext="Loading…"></div>
33 |
34 | Preset colors
35 | 36 | 37 | 38 | 39 |<div class="spinner" data-options="blue" role="progressbar" aria-valuetext="Loading…"></div>
40 |
41 | Preset sizes
42 | 43 |44 | 45 |
46 | 47 |
<div class="spinner" data-options="large" role="progressbar" aria-valuetext="Loading…"></div>
48 |
49 | Completely custom
50 | 51 |52 | 53 | 54 | 55 | 56 |
<div class="spinner" data-options="blue" style="font-size:71px;box-shadow:inset 0 0 0 2px" role="progressbar" aria-valuetext="Loading…"></div>
57 |
58 | Multicolor
59 | 60 |61 | 62 |
<div class="spinner" data-options="multicolor" role="progressbar" aria-valuetext="Loading…"></div>
63 |
64 | How it's done
65 | 66 |67 | 68 | 69 | 70 | 71 |
Outstanding resources
72 |-
73 |
- csstriggers.com 74 |
- github.com (<paper-spinner>) 75 |
- html5rocks.com (high performance animations) 76 |
- paulirish.com (translate animations) 77 |
- MDN (transform) 78 |
- stackoverflow.com (IE10 bug) 79 |
81 |
*I use clip-path: circle()
, which is not available in IE or Firefox, as a progressive enhancement only to remove small artifacts left over from the animations.
**All spinners animate with composite properties except the multicolor spinner. The multicolor spinner unfortunately invokes repaints on color changes. :/ On the plus side, I haven't seen the frame rate dip below 60fps.
83 |