A Pen by Ryan Allen on CodePen.
Last active
November 10, 2015 16:18
-
-
Save Poordeveloper/837fda234cba803f75a1 to your computer and use it in GitHub Desktop.
OPpbbR
This file contains hidden or 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
<h1>Animated SVG Loaders</h1> | |
<!-- DIVIDER --> | |
<svg version="1.1" | |
class="svg-divider" | |
xmlns="http://www.w3.org/2000/svg" | |
xmlns:xlink="http://www.w3.org/1999/xlink" | |
x="0px" | |
y="0px" | |
viewBox="0 0 80 3" | |
xml:space="preserve" | |
> | |
<rect | |
x="1" | |
fill="#c6c3b9" | |
width="16" | |
height=".2" | |
> | |
<animate | |
attributeName="x" | |
attributeType="XML" | |
values="1; 64; 1" | |
begin="0s" dur="1.5s" repeatCount="indefinite" /> | |
</rect> | |
</svg> | |
<!-- SPINNER #1 --> | |
<svg version="1.1" | |
class="svg-loader" | |
xmlns="http://www.w3.org/2000/svg" | |
xmlns:xlink="http://www.w3.org/1999/xlink" | |
x="0px" | |
y="0px" | |
viewBox="0 0 80 80" | |
xml:space="preserve"> | |
<path | |
id="spinner" | |
fill="#D43B11" | |
d="M40,72C22.4,72,8,57.6,8,40C8,22.4, | |
22.4,8,40,8c17.6,0,32,14.4,32,32c0,1.1-0.9,2-2,2 | |
s-2-0.9-2-2c0-15.4-12.6-28-28-28S12,24.6,12,40s12.6, | |
28,28,28c1.1,0,2,0.9,2,2S41.1,72,40,72z" | |
> | |
<animateTransform | |
attributeType="xml" | |
attributeName="transform" | |
type="rotate" | |
from="0 40 40" | |
to="360 40 40" | |
dur="0.6s" | |
repeatCount="indefinite" | |
/> | |
</path> | |
</svg> | |
<!-- SPINNER #2 --> | |
<svg version="1.1" | |
class="svg-loader" | |
xmlns="http://www.w3.org/2000/svg" | |
xmlns:xlink="http://www.w3.org/1999/xlink" | |
x="0px" | |
y="0px" | |
viewBox="0 0 80 80" | |
xml:space="preserve"> | |
<path | |
f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.9-1.2-1.8-1.9-2.7c-1.4-1.8-3.2-3.4-5.2-4.9 | |
c-2-1.5-4.4-2.7-6.9-3.6c-0.6-0.2-1.3-0.4-1.9-0.6c-0.7-0.2-1.3-0.3-1.9-0.4c-1.2-0.3-2.8-0.4-4.2-0.5l-2,0c-0.7,0-1.4,0.1-2.1,0.1 | |
c-0.7,0.1-1.4,0.1-2,0.3c-0.7,0.1-1.3,0.3-2,0.4c-2.6,0.7-5.2,1.7-7.5,3.1c-2.2,1.4-4.3,2.9-6,4.7c-0.9,0.8-1.6,1.8-2.4,2.7 | |
c-0.7,0.9-1.3,1.9-1.9,2.8c-0.5,1-1,1.9-1.4,2.8c-0.4,0.9-0.8,1.8-1,2.6c-0.3,0.9-0.5,1.6-0.7,2.4c-0.2,0.7-0.3,1.4-0.4,2.1 | |
c-0.1,0.3-0.1,0.6-0.2,0.9c0,0.3-0.1,0.6-0.1,0.8c0,0.5-0.1,0.9-0.1,1.3C10,39.6,10,40,10,40z" | |
> | |
<animateTransform | |
attributeType="xml" | |
attributeName="transform" | |
type="rotate" | |
from="0 40 40" | |
to="360 40 40" | |
dur="0.6s" | |
repeatCount="indefinite" | |
/> | |
</path> | |
</svg> | |
<!-- SPINNER #3 --> | |
<svg version="1.1" | |
class="svg-loader" | |
xmlns="http://www.w3.org/2000/svg" | |
xmlns:xlink="http://www.w3.org/1999/xlink" | |
x="0px" | |
y="0px" | |
viewBox="0 0 80 80" | |
xml:space="preserve" | |
> | |
<path | |
fill="#D43B11" | |
d="M10,40c0,0,0-0.4,0-1.1c0-0.3,0-0.8,0-1.3c0-0.3,0-0.5,0-0.8c0-0.3,0.1-0.6,0.1-0.9c0.1-0.6,0.1-1.4,0.2-2.1 | |
c0.2-0.8,0.3-1.6,0.5-2.5c0.2-0.9,0.6-1.8,0.8-2.8c0.3-1,0.8-1.9,1.2-3c0.5-1,1.1-2,1.7-3.1c0.7-1,1.4-2.1,2.2-3.1 | |
c1.6-2.1,3.7-3.9,6-5.6c2.3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.3,2.9-6,4.7c-0.9,0.8-1.6,1.8-2.4,2.7 | |
c-0.7,0.9-1.3,1.9-1.9,2.8c-0.5,1-1,1.9-1.4,2.8c-0.4,0.9-0.8,1.8-1,2.6c-0.3,0.9-0.5,1.6-0.7,2.4c-0.2,0.7-0.3,1.4-0.4,2.1 | |
c-0.1,0.3-0.1,0.6-0.2,0.9c0,0.3-0.1,0.6-0.1,0.8c0,0.5-0.1,0.9-0.1,1.3C10,39.6,10,40,10,40z" | |
> | |
<animateTransform | |
attributeType="xml" | |
attributeName="transform" | |
type="rotate" | |
from="0 40 40" | |
to="360 40 40" | |
dur="0.8s" | |
repeatCount="indefinite" | |
/> | |
</path> | |
<path | |
fill="#D43B11" | |
d="M62,40.1c0,0,0,0.2-0.1,0.7c0,0.2,0,0.5-0.1,0.8c0,0.2,0,0.3,0,0.5c0,0.2-0.1,0.4-0.1,0.7 | |
c-0.1,0.5-0.2,1-0.3,1.6c-0.2,0.5-0.3,1.1-0.5,1.8c-0.2,0.6-0.5,1.3-0.7,1.9c-0.3,0.7-0.7,1.3-1,2.1c-0.4,0.7-0.9,1.4-1.4,2.1 | |
c-0.5,0.7-1.1,1.4-1.7,2c-1.2,1.3-2.7,2.5-4.4,3.6c-1.7,1-3.6,1.8-5.5,2.4c-2,0.5-4,0.7-6.2,0.7c-1.9-0.1-4.1-0.4-6-1.1 | |
c-1.9-0.7-3.7-1.5-5.2-2.6c-1.5-1.1-2.9-2.3-4-3.7c-0.6-0.6-1-1.4-1.5-2c-0.4-0.7-0.8-1.4-1.2-2c-0.3-0.7-0.6-1.3-0.8-2 | |
c-0.2-0.6-0.4-1.2-0.6-1.8c-0.1-0.6-0.3-1.1-0.4-1.6c-0.1-0.5-0.1-1-0.2-1.4c-0.1-0.9-0.1-1.5-0.1-2c0-0.5,0-0.7,0-0.7 | |
s0,0.2,0.1,0.7c0.1,0.5,0,1.1,0.2,2c0.1,0.4,0.2,0.9,0.3,1.4c0.1,0.5,0.3,1,0.5,1.6c0.2,0.6,0.4,1.1,0.7,1.8 | |
c0.3,0.6,0.6,1.2,0.9,1.9c0.4,0.6,0.8,1.3,1.2,1.9c0.5,0.6,1,1.3,1.6,1.8c1.1,1.2,2.5,2.3,4,3.2c1.5,0.9,3.2,1.6,5,2.1 | |
c1.8,0.5,3.6,0.6,5.6,0.6c1.8-0.1,3.7-0.4,5.4-1c1.7-0.6,3.3-1.4,4.7-2.4c1.4-1,2.6-2.1,3.6-3.3c0.5-0.6,0.9-1.2,1.3-1.8 | |
c0.4-0.6,0.7-1.2,1-1.8c0.3-0.6,0.6-1.2,0.8-1.8c0.2-0.6,0.4-1.1,0.5-1.7c0.1-0.5,0.2-1,0.3-1.5c0.1-0.4,0.1-0.8,0.1-1.2 | |
c0-0.2,0-0.4,0.1-0.5c0-0.2,0-0.4,0-0.5c0-0.3,0-0.6,0-0.8c0-0.5,0-0.7,0-0.7c0-1.1,0.9-2,2-2s2,0.9,2,2C62,40,62,40.1,62,40.1z" | |
> | |
<animateTransform | |
attributeType="xml" | |
attributeName="transform" | |
type="rotate" | |
from="0 40 40" | |
to="-360 40 40" | |
dur="0.6s" | |
repeatCount="indefinite" | |
/> | |
</path> | |
</svg> |
This file contains hidden or 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
body{ | |
background: #252b34; | |
color: #c6c3b9; | |
font-family: "Helvetica Neue", sans-serif; | |
margin: 0 auto; | |
text-align: center; | |
} | |
h1{ | |
font-size: 8vmin; | |
font-weight: lighter; | |
} | |
.svg-loader{ | |
height: 20vmin; | |
padding: 3vmin 20vmin; | |
vertical-align: top; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment