Last active
February 26, 2017 17:49
-
-
Save kentbrew/873fabf69f678a7b1d6127ea6e02d481 to your computer and use it in GitHub Desktop.
An animated SVG, suitable for use as a progress indicator.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<svg | |
version="1.1" | |
xmlns="http://www.w3.org/2000/svg" | |
xmlns:xlink="http://www.w3.org/1999/xlink" | |
height="320" | |
width="320" | |
viewBox="0 0 16 16" | |
xml:space="preserve" > | |
<path fill="#000" | |
d="M 8, 0 | |
A .5, .5, 0, 0, 0, 8, 1 | |
A 6, 7, 0, 0, 1, 14, 8 | |
A 6, 6, 0, 0, 1, 8, 14 | |
A 5, 6, 0, 0, 1, 3, 8 | |
A 1, 1, 0, 0, 0, 0, 8 | |
A 8, 8, 0, 0, 0, 8, 16 | |
A 8, 8, 0, 0, 0, 16, 8 | |
A 8, 8, 0, 0, 0, 8, 0 | |
Z" | |
> | |
<animateTransform | |
attributeType="XML" | |
attributeName="transform" | |
type="rotate" | |
from="0 8 8" | |
to="360 8 8" | |
dur="0.6s" | |
repeatCount="indefinite" /> | |
</path> | |
</svg> |
Kent Brewster you're my hero.
Minor but important update for Firefox: it wants that leading zero in dur="0.6s"
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Two easy ways to change the size: alter height and width in the
svg
tag, or scale it as a background image in the CSS selector of your choice.