Skip to content

Instantly share code, notes, and snippets.

@csssecrets
Last active May 3, 2024 05:23
Show Gist options
  • Select an option

  • Save csssecrets/bda1bf6b0c4adbcea63d to your computer and use it in GitHub Desktop.

Select an option

Save csssecrets/bda1bf6b0c4adbcea63d to your computer and use it in GitHub Desktop.
Text on a circle
/**
* Text on a circle
*/
div {
width: 70vmin;
height: 70vmin;
font: bold 120% Helvetica, sans-serif;
margin: 3em auto 0;
}
div > svg {
display: block;
overflow: visible;
transition: 5s linear;
}
div > svg:hover { transform: rotate(1turn); }
div > svg text { fill: currentColor }
div > svg path { fill: none; }
<div>
<svg viewBox="0 0 100 100">
<path d="M 0,50 a 50,50 0 1,1 0,.01" id="circle" />
<text><textPath xlink:href="#circle">
circular reasoning works because
</textPath></text>
</svg>
</div>
// alert('Hello world!');
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment