Created
December 24, 2010 05:24
-
-
Save latompa/753930 to your computer and use it in GitHub Desktop.
slider with letter-spacing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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