Site Notice
hello, world
Difference between revisions of "Svg loading"
From Project-EPB Commons
m ([InPageEdit] 没有编辑摘要) |
([InPageEdit] 没有编辑摘要) |
||
Line 2: | Line 2: | ||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" class="svgspinner" width="52px" height="52px"> | <svg xmlns="http://www.w3.org/2000/svg" version="1.1" class="svgspinner" width="52px" height="52px"> | ||
<g id="group" style="" transform="translate(26,26)"> | <g id="group" style="" transform="translate(26,26)"> | ||
− | <circle data-status="doMinus" r="20" stroke="#33a0fb" stroke-width="6 | + | <circle data-status="doMinus" r="20" stroke="#33a0fb" stroke-width="6" fill="transparent" cx="0" cy="0"></circle> |
</g> | </g> | ||
<style> | <style> | ||
.svgspinner circle { | .svgspinner circle { | ||
− | animation: circle-spin | + | animation: circle-spin 2s infinite linear; |
− | + | stroke-dasharray: 1000; | |
+ | stroke-dashoffset: 1000; | ||
} | } | ||
@keyframes circle-spin { | @keyframes circle-spin { | ||
− | + | 0% { | |
transform: rotate(0deg); | transform: rotate(0deg); | ||
+ | stroke-dashoffset: 1000; | ||
} | } | ||
− | + | 50% { | |
+ | transform: rotate(360deg); | ||
+ | stroke-dashoffset: 0; | ||
+ | } | ||
+ | 100% { | ||
transform: rotate(720deg); | transform: rotate(720deg); | ||
+ | stroke-dashoffset: 1000; | ||
} | } | ||
} | } | ||
</style> | </style> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</svg> | </svg> | ||
</html> | </html> |
Revision as of 01:55, 3 December 2019
<html> <svg xmlns="http://www.w3.org/2000/svg" version="1.1" class="svgspinner" width="52px" height="52px"> <g id="group" style="" transform="translate(26,26)"> <circle data-status="doMinus" r="20" stroke="#33a0fb" stroke-width="6" fill="transparent" cx="0" cy="0"></circle> </g> <style> .svgspinner circle {
animation: circle-spin 2s infinite linear; stroke-dasharray: 1000; stroke-dashoffset: 1000;
} @keyframes circle-spin {
0% { transform: rotate(0deg); stroke-dashoffset: 1000; } 50% { transform: rotate(360deg); stroke-dashoffset: 0; } 100% { transform: rotate(720deg); stroke-dashoffset: 1000; }
} </style> </svg> </html>