letter-spacing Attribute | letterSpacing参数属性
| DHTML文档教程 |
Sets or retrieves the amount of additional space between letters in the object. dhtml语法 HTML |
{ letter-spacing : sSpacing }
|
---|
Scripting | object.style.letterSpacing [ = sSpacing ] |
---|
DHTML可能的值 sSpacing | Variant that
specifies or receives one of the following values.normal | Default. Default spacing. | length | Floating-point number, followed by an absolute units designator (cm, mm, in, pt, pc, or px) or a relative units designator (em or ex). For more information about the supported length units, see CSS Length Units Reference. |
|
The property is read/write
for all objects except the following, for which it is read-only:
currentStyle.
The property has a default value of
normal. The Cascading Style Sheets (CSS) attribute is
inherited.
Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see about dynamic properties.
remarks when specified as a positive length value, the letter-spacing attribute adds the specified value to the default spacing between characters within an element. a negative length value decreases the space between characters. letter spacing can be influenced by justification.
Examples
The following examples use the letter-spacing attribute and the letterSpacing property to change the space between letters.
This example uses blockquote as a selector to change the spacing to -0.2 millimeters for all blockquote objects on the page. <STYLE>
BLOCKQUOTE { letter-spacing:-0.2mm }
</STYLE> This feature requires Microsoft® Internet Explorer 4.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample. 
This example uses inline scripting to set the spacing to 1 millimeter when an onmouseover event occurs. <div style="font-size:14" onmouseover="this.style.letterspacing='1mm'">
:
</DIV> This feature requires Microsoft® Internet Explorer 4.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.  是否符合公共标准
This property is defined in
Cascading Style Sheets (CSS), Level 1 (CSS1) .
Applies To |
A,
ADDRESS,
B,
BIG,
BLOCKQUOTE,
BODY,
BUTTON,
CAPTION,
CENTER,
CITE,
CODE,
COL,
COLGROUP,
currentStyle,
CUSTOM,
DD,
defaults,
DFN,
DIR,
DIV,
DL,
DT,
EM,
FIELDSET,
FORM,
hn,
HTML,
I,
IMG,
INPUT type=button,
INPUT type=checkbox,
INPUT type=file,
INPUT type=image,
INPUT type=password,
INPUT type=radio,
INPUT type=reset,
INPUT type=submit,
INPUT type=text,
ISINDEX,
KBD,
LABEL,
LEGEND,
LI,
LISTING,
MARQUEE,
MENU,
OL,
P,
PLAINTEXT,
PRE,
runtimeStyle,
S,
SAMP,
SELECT,
SMALL,
SPAN,
STRIKE,
STRONG,
style,
SUB,
SUP,
TABLE,
TBODY,
TD,
TEXTAREA,
TFOOT,
TH,
THEAD,
TR,
TT,
U,
UL,
VAR,
XMP | |
|