text-underline-position Attribute | textUnderlinePosition参数属性
| DHTML文档教程 |
Sets or retrieves the position of the underline decoration that is set through the textdecoration property of the object. What's New for Microsoft® Internet Explorer 6
The
auto and
auto-pos values apply to this property as of
Internet Explorer 6. The default value of this property is
auto as of
Internet Explorer 6. With
Internet Explorer 5.5, the default value of this property is
below.
dhtml语法 HTML |
{ text-underline-position : sPosition }
|
---|
Scripting | object.style.textUnderlinePosition [ = sPosition ] |
---|
DHTML可能的值 sPosition | String that
specifies or receives one of the following values.above | Decoration appears above the text. | below | Decoration appears below the text. | auto | Default. Internet Explorer 6 and later. Decoration appears above the text if the lang attribute is set to ja, which is the language code abbreviation for the japanese language, and the writing-mode attribute is set to tb-rl, which causes vertical inline text progression. if not, the decoration appears below the text. | auto-pos | internet explorer 6 and later. identical to auto. |
|
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
auto. The Microsoft Cascading Style Sheets (CSS) extension 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 This property specifies the position of the underline decoration. To turn the decoration on or off, use the textDecoration property. The position of the underline decoration is relative to the layout of the text in the object.
With vertical text, it is more accurate to say that the above value causes the underline decoration to be laid out before the text or that the decoration appears before the text. With the below value, then, the decoration appears after the text. With Internet Explorer 5.5 only, the default value of this property is below.
Examples
The following example shows how all of the elements in a document inherit the textUnderlinePosition style rule from the parent HTML element.
Underline decorations throughout the document are positioned above the text, relative to the layout of the text. <HTML STYLE="text-underline-position:above">
<HEAD><TITLE></TITLE></HEAD>
<BODY>
<P><SPAN>This horizontal SPAN element is not underlined.</SPAN>
<SPAN STYLE="text-decoration:underline">This horizontal SPAN
element is underlined above the text.</SPAN></P>
<P STYLE="writing-mode:tb-rl"><SPAN>This vertical SPAN element is
not underlined.</SPAN>
<SPAN STYLE="text-decoration:underline">This vertical SPAN element
is underlined above the text.</SPAN></P> This feature requires Microsoft® Internet Explorer 5.5 or later. Click the following icon to install the latest version. Then reload this page to view the sample.
The following example demonstrates the effect of the auto value of the textUnderlinePosition property when the LANG attribute of an object containing vertical inline text is set to ja. <div style="writing-mode:tb-rl; text-decoration:underline;
text-underline-position:auto">
<p>This element contains underlined vertical text.
The LANG attribute of this element is not explicitly set.
The underline decoration appears below, or after,
the text when text-underline-position is set to auto.</p>
<p lang="ja">This element also contains underlined vertical text.
The LANG attribute of this element is set to ja.
The underline decoration in this element appears above,
or before the text.</p>
</div> This feature requires Microsoft® Internet Explorer 6 or later. Click the following icon to install the latest version. Then reload this page to view the sample.
是否符合公共标准
This property is a Microsoft extension to
Cascading Style Sheets (CSS) .
Applies To |
A,
ACRONYM,
ADDRESS,
APPLET,
B,
BASE,
BASEFONT,
BDO,
BGSOUND,
BIG,
BLOCKQUOTE,
BODY,
BUTTON,
CAPTION,
CENTER,
CITE,
CODE,
COL,
COLGROUP,
COMMENT,
currentStyle,
CUSTOM,
DD,
DEL,
DFN,
DIR,
DIV,
DL,
DT,
EM,
EMBED,
FIELDSET,
FONT,
FORM,
FRAMESET,
HEAD,
hn,
HR,
HTML,
I,
IMG,
INPUT,
INPUT type=button,
INPUT type=checkbox,
INPUT type=file,
INPUT type=hidden,
INPUT type=image,
INPUT type=password,
INPUT type=radio,
INPUT type=reset,
INPUT type=submit,
INPUT type=text,
INS,
ISINDEX,
KBD,
LABEL,
LEGEND,
LI,
LINK,
LISTING,
MARQUEE,
MENU,
nextID,
NOBR,
NOFRAMES,
NOSCRIPT,
OBJECT,
OL,
OPTION,
P,
PLAINTEXT,
PRE,
Q,
RT,
RUBY,
runtimeStyle,
S,
SAMP,
SCRIPT,
SELECT,
SMALL,
SPAN,
STRIKE,
STRONG,
style,
SUB,
SUP,
TABLE,
TBODY,
TD,
TEXTAREA,
TFOOT,
TH,
THEAD,
TITLE,
TR,
TT,
U,
UL,
VAR,
XML,
XMP | |
更多语法参考 css3 module: text
|