Skip to content

Instantly share code, notes, and snippets.

@markadrake
Created September 2, 2017 16:30
Show Gist options
  • Save markadrake/c32f84c98b72b95b7d1a6c407e639b27 to your computer and use it in GitHub Desktop.
Save markadrake/c32f84c98b72b95b7d1a6c407e639b27 to your computer and use it in GitHub Desktop.
Responsive Type through SVG
<!--
Responsive Type through SVG
CodePen: https://codepen.io/markadrake/pen/dWgyvK
-->
<html>
<head>
<meta charset="UTF-8">
<title>CodePen - SVG Text Spacing</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
html,
body {
min-height: 100%;
}
body {
padding: 20px;
}
svg {
border: 1px dashed #efefef;
}
</style>
</head>
<body>
<svg xmlns="https://www.w3.org/2000/svg" viewBox="0 0 260 40">
<text x="0" y="34" font-size="40">
RESPONSIVE
</text>
</svg>
<svg xmlns="https://www.w3.org/2000/svg" viewBox="0 0 260 60">
<text x="130" y="54" font-size="70" text-anchor="middle" style="font-weight:bold">
TYPE
</text>
</svg>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment