Skip to content

Instantly share code, notes, and snippets.

Forked from dustin/index.html
Last active August 27, 2017 21:09
  • Star 6 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Text Along a Path
license: gpl-3.0
<!DOCTYPE html>
<meta charset="utf-8">
#curve-text {
font: 40px sans-serif;
#curve-line {
stroke: #999;
fill: none;
<script src="//"></script>
var svg ="body").append("svg")
.attr("width", 960)
.attr("height", 500)
.attr("viewBox", "0 0 1000 300");
.attr("id", "curve")
.attr("d", "M100,200C200,100 300,0 400,100C500,200 600,300 700,200C800,100 900,100 900,100");
.attr("id", "curve-text")
.attr("xlink:href", "#curve")
.text("We go up, then we go down, then up again.");
.attr("id", "curve-line")
.attr("xlink:href", "#curve");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment