Skip to content

Instantly share code, notes, and snippets.

@latompa
Created December 24, 2010 05:24
Show Gist options
  • Save latompa/753930 to your computer and use it in GitHub Desktop.
Save latompa/753930 to your computer and use it in GitHub Desktop.
slider with letter-spacing
<!DOCTYPE HTML>
<html>
<head>
<style>
* {
font-family: sans-serif;
}
h1 {
font-size: 48px;
letter-spacing: 0px;
}
</style>
</head>
<body>
<input type="range" min="-100" max="100" value="0" step="1" onchange="changeSpacing(this.value)" />
<h1 id="headline">The Brown Fox Jumps Over Something</h1>
<script type="text/javascript">
function changeSpacing(newValue)
{
document.getElementById("headline").style.letterSpacing=newValue + "px";
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment