Skip to content

Instantly share code, notes, and snippets.

@essingen123
Last active October 2, 2019 15:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save essingen123/a3b7021db5c40ebc4cd219843155adb3 to your computer and use it in GitHub Desktop.
Save essingen123/a3b7021db5c40ebc4cd219843155adb3 to your computer and use it in GitHub Desktop.
Infinity and beyond unicorns in Animation spin le Circle text with SVG
<div id="container">
<div id="circle">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="300px" height="300px" viewBox="0 0 300 300" enable-background="new 0 0 300 300" xml:space="preserve">
<defs>
<path id="circlePath" d=" M 150, 150 m -60, 0 a 60,60 0 0,1 120,0 a 60,60 0 0,1 -120,0 "/>
</defs>
<circle cx="150" cy="100" r="75" fill="none"/>
<g>
<use xlink:href="#circlePath" fill="none"/>
<text fill="#f8f8f8">
<textPath xlink:href="#circlePath"><!--FeelnJoy-->🦄✨ racing illusions</textPath>
</text>
</g>
</svg>
</div>
</div>
#container {
margin: -6px;
background-color: #000303;
}
#circle {
position: relative;
width: 100%;
padding-bottom: 100%;
overflow: hidden;
}
#circle text {
font-family: "Helvetica Neue", Arial;
font-size: 36px;
font-weight: bold;
}
#circle svg {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 50%;
-webkit-animation-name: rotate;
-moz-animation-name: rotate;
-ms-animation-name: rotate;
-o-animation-name: rotate;
animation-name: rotate;
-webkit-animation-duration: 3s;
-moz-animation-duration: 3s;
-ms-animation-duration: 3s;
-o-animation-duration: 3s;
animation-duration: 3s;
-webkit-animation-iteration-count: infinite;
-moz-animation-iteration-count: infinite;
-ms-animation-iteration-count: infinite;
-o-animation-iteration-count: infinite;
animation-iteration-count: infinite;
-webkit-animation-timing-function: linear;
-moz-animation-timing-function: linear;
-ms-animation-timing-function: linear;
-o-animation-timing-function: linear;
animation-timing-function: linear;
}
@-webkit-keyframes rotate {
from {
-webkit-transform: rotate(360deg);
}
to {
-webkit-transform: rotate(0);
}
}
@-moz-keyframes rotate {
from {
-moz-transform: rotate(360deg);
}
to {
-moz-transform: rotate(0);
}
}
@-ms-keyframes rotate {
from {
-ms-transform: rotate(360deg);
}
to {
-ms-transform: rotate(0);
}
}
@-o-keyframes rotate {
from {
-o-transform: rotate(360deg);
}
to {
-o-transform: rotate(0);
}
}
@keyframes rotate {
from {
transform: rotate(360deg);
}
to {
transform: rotate(0);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment