HTML/CSS/CSS Attributes and Javascript Style Properties/letter spacing
Содержание
letter-spacing: 2px
<source lang="html4strict">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <html> <head> <title>css typography</title> <style type="text/css"> p {
font-family: Verdana, arial, helvetica, sans-serif; font-size: 16px; letter-spacing: 2px; word-spacing: 10px;
} </style> </head> <body>
this is a test.
this is a test.
this is a test. this is a test. this is a test.
this is a test.
</body> </html>
</source>
"letter-spacing" Example
<source lang="html4strict">
<html> <body>
This is a sample text.
<input type="button"
value="Set letterSpacing to 0.5mm" onclick="myP.style.letterSpacing="0.5mm"">
<input type="button"
value="Set letterSpacing to 1mm" onclick="myP.style.letterSpacing="1mm"">
<input type="button"
value="Set letterSpacing to normal" onclick="myP.style.letterSpacing="normal"">
</body> </html>
</source>
letter-spacing (negative)
<source lang="html4strict">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html>
<head> <title></title> <style type="text/css"> p { letter-spacing: -2px; } </style> </head> <body>
Two pixels of space have been subtracted from between each letter.
</body>
</html>
</source>