www.fgks.org   »   [go: up one dir, main page]

Click to Rate and Give Feedback
 runtimeStyle Object
runtimeStyle Object

Represents the cascaded format and style of the object that overrides the format and style specified in global style sheets, inline styles, and HTML attributes.

Members Table

The following table lists the members exposed by the runtimeStyle object.

Attributes/Properties
Show:
AttributePropertyDescription
counter-increment New for Windows Internet Explorer 8 counterIncrement Sets or retrieves a list of counters to increment.
counter-reset New for Internet Explorer 8 counterReset Sets or retrieves a list of counters to create or reset to zero.
-ms-box-sizing New for Internet Explorer 8 msBoxSizing Sets or retrieves the box model to use for object sizing.
onOffBehavior Gets an object that indicates whether the specified Microsoft DirectAnimation behavior is running.
Filter propertyDescription
Alpha Adjusts the opacity of the content of the object.
BlendTrans Reveals new content of the object by fading the original content.
Chroma Displays a specific color of the content of the object as transparent.
DropShadow Creates a solid silhouette of the content of the object, offset in the specified direction. This creates the illusion that the content is floating and casting a shadow.
FlipH Displays the content of the object flipped across the horizontal axis.
FlipV Displays the content of the object flipped across the vertical axis.
Glow Adds radiance around the outside edges of the content of the object so that it appears to glow.
Gray Displays the content of the object in grayscale.
Invert Reverses the hue, saturation, and brightness values of the content of the object.
Light Creates the effect of a light shining on the content of the object.
MaskFilter Displays transparent pixels of the object content as a color mask, and makes the nontransparent pixels transparent.
MotionBlur Causes the content of the object to appear to be in motion.
Redirect Not currently supported.
RevealTrans Reveals new content of the object using one of 24 predefined Transition effects.
Shadow Creates a solid silhouette of the content of the object, offset in the specified direction. This creates the illusion of a shadow.
Wave Performs a sine wave distortion of the content of the object along the vertical axis.
Xray Changes the color depth of the content of the object and displays it in black and white.
MethodDescription
getAttribute Retrieves the value of the specified attribute.
getExpression Retrieves the expression for the given property.
removeAttribute Removes the given attribute from the object.
removeExpression Removes the expression from the specified property.
setAttribute Sets the value of the specified attribute.
setExpression Sets an expression for the specified object.
Style attributeStyle propertyDescription
ACCELERATORaccelerator Sets or retrieves a string that indicates whether the object contains an accelerator key.
backgroundbackground Sets or retrieves up to five separate background properties of the object.
background-attachmentbackgroundAttachment Sets or retrieves how the background image is attached to the object within the document.
background-colorbackgroundColor Sets or retrieves the color behind the content of the object.
background-imagebackgroundImage Sets or retrieves the background image of the object.
background-positionbackgroundPosition Sets or retrieves the position of the background of the object.
background-position-xbackgroundPositionX Sets or retrieves the x-coordinate of the backgroundPosition property.
background-position-ybackgroundPositionY Sets or retrieves the y-coordinate of the backgroundPosition property.
background-repeatbackgroundRepeat Sets or retrieves how the backgroundImage property of the object is tiled.
behaviorbehavior Sets or retrieves the location of the Dynamic HTML (DHTML) behavior.
borderborder Sets or retrieves the properties to draw around the object.
border-bottomborderBottom Sets or retrieves the properties of the bottom border of the object.
border-bottom-colorborderBottomColor Sets or retrieves the color of the bottom border of the object.
border-bottom-styleborderBottomStyle Sets or retrieves the style of the bottom border of the object.
border-bottom-widthborderBottomWidth Sets or retrieves the width of the bottom border of the object.
border-collapseborderCollapse Sets or retrieves a value that indicates whether the row and cell borders of a table are joined in a single border or detached as in standard HTML.
border-colorborderColor Sets or retrieves the border color of the object.
border-leftborderLeft Sets or retrieves the properties of the left border of the object.
border-left-colorborderLeftColor Sets or retrieves the color of the left border of the object.
border-left-styleborderLeftStyle Sets or retrieves the style of the left border of the object.
border-left-widthborderLeftWidth Sets or retrieves the width of the left border of the object.
border-rightborderRight Sets or retrieves the properties of the right border of the object.
border-right-colorborderRightColor Sets or retrieves the color of the right border of the object.
border-right-styleborderRightStyle Sets or retrieves the style of the right border of the object.
border-right-widthborderRightWidth Sets or retrieves the width of the right border of the object.
border-spacing New for Internet Explorer 8 borderSpacing Sets or retrieves the distance between the borders of adjoining cells in a table.
border-styleborderStyle Sets or retrieves the style of the left, right, top, and bottom borders of the object.
border-topborderTop Sets or retrieves the properties of the top border of the object.
border-top-colorborderTopColor Sets or retrieves the color of the top border of the object.
border-top-styleborderTopStyle Sets or retrieves the style of the top border of the object.
border-top-widthborderTopWidth Sets or retrieves the width of the top border of the object.
border-widthborderWidth Sets or retrieves the width of the left, right, top, and bottom borders of the object.
bottombottom Sets or retrieves the bottom position of the object in relation to the bottom of the next positioned object in the document hierarchy.
caption-side New for Internet Explorer 8 captionSide Sets or retrieves where the caption of a table is located.
clearclear Sets or retrieves whether the object allows floating objects on its left side, right side, or both, so that the next text displays past the floating objects.
clipclip Sets or retrieves which part of a positioned object is visible.
colorcolor Sets or retrieves the color of the text of the object.
content New for Internet Explorer 8 content Sets or retrieves generated content to insert before or after an element.
cssText Sets or retrieves the persisted representation of the style rule.
cursorcursor Sets or retrieves the type of cursor to display as the mouse pointer moves over the object.
directiondirection Sets or retrieves the reading order of the object.
fontfont Sets or retrieves a combination of separate font properties of the object. Alternatively, sets or retrieves one or more of six user-preference fonts.
font-familyfontFamily Sets or retrieves the name of the font used for text in the object.
font-sizefontSize Sets or retrieves a value that indicates the font size used for text in the object.
font-stylefontStyle Sets or retrieves the font style of the object as italic, normal, or oblique.
font-variantfontVariant Sets or retrieves whether the text of the object is in small capital letters.
font-weightfontWeight Sets or retrieves the weight of the font of the object.
heightheight Sets or retrieves the height of the object.
ime-modeimeMode Sets or retrieves the state of an Input Method Editor (IME).
layout-flowlayoutFlow Sets or retrieves the direction and flow of the content in the object.
layout-gridlayoutGrid Sets or retrieves the composite document grid properties that specify the layout of text characters.
layout-grid-charlayoutGridChar Sets or retrieves the size of the character grid used for rendering the text content of an element.
layout-grid-linelayoutGridLine Sets or retrieves the gridline value used for rendering the text content of an element.
layout-grid-modelayoutGridMode Sets or retrieves whether the text layout grid uses two dimensions.
layout-grid-typelayoutGridType Sets or retrieves the type of grid used for rendering the text content of an element.
leftleft Sets or retrieves the position of the object relative to the left edge of the next positioned object in the document hierarchy.
letter-spacingletterSpacing Sets or retrieves the amount of additional space between letters in the object.
line-breaklineBreak Sets or retrieves line-breaking rules for text in selected languages such as Japanese, Chinese and Korean.
line-heightlineHeight Sets or retrieves the distance between lines in the object.
list-stylelistStyle Sets or retrieves up to three separate listStyle properties of the object.
list-style-imagelistStyleImage Sets or retrieves a value that indicates which image to use as a list-item marker for the object.
list-style-positionlistStylePosition Sets or retrieves a variable that indicates how the list-item marker is drawn relative to the content of the object.
list-style-typelistStyleType Sets or retrieves the predefined type of the line-item marker for the object.
marginmargin Sets or retrieves the width of the top, right, bottom, and left margins of the object.
margin-bottommarginBottom Sets or retrieves the height of the bottom margin of the object.
margin-leftmarginLeft Sets or retrieves the width of the left margin of the object.
margin-rightmarginRight Sets or retrieves the width of the right margin of the object.
margin-topmarginTop Sets or retrieves the height of the top margin of the object.
max-heightmaxHeight Sets or retrieves the maximum height for an element.
max-widthmaxWidth Sets or retrieves the maximum width for an element.
min-heightminHeight Sets or retrieves the minimum height for an element.
min-widthminWidth Sets or retrieves the minimum width for an element.
-ms-interpolation-modemsInterpolationMode Sets or retrieves the interpolation (resampling) method used to stretch images.
orphans New for Internet Explorer 8 orphans Sets or retrieves the minimum number of lines of a paragraph that must appear at the bottom of a page.
outline New for Internet Explorer 8 outline Sets or retrieves the color, style, and width of the outline frame.
outline-color New for Internet Explorer 8 outlineColor Sets or retrieves the color of the outline frame.
outline-style New for Internet Explorer 8 outlineStyle Sets or retrieves the style of the outline frame.
outline-width New for Internet Explorer 8 outlineWidth Sets or retrieves the width of the outline frame.
overflowoverflow Sets or retrieves a value indicating how to manage the content of the object when the content exceeds the height or width of the object.
overflow-xoverflowX Sets or retrieves how to manage the content of the object when the content exceeds the width of the object.
overflow-yoverflowY Sets or retrieves how to manage the content of the object when the content exceeds the height of the object.
paddingpadding Sets or retrieves the amount of space to insert between the object and its margin or, if there is a border, between the object and its border.
padding-bottompaddingBottom Sets or retrieves the amount of space to insert between the bottom border of the object and the content.
padding-leftpaddingLeft Sets or retrieves the amount of space to insert between the left border of the object and the content.
padding-rightpaddingRight Sets or retrieves the amount of space to insert between the right border of the object and the content.
padding-toppaddingTop Sets or retrieves the amount of space to insert between the top border of the object and the content.
page-break-afterpageBreakAfter Sets or retrieves a value indicating whether a page break occurs after the object.
page-break-beforepageBreakBefore Sets or retrieves a string indicating whether a page break occurs before the object.
page-break-inside New for Internet Explorer 8 pageBreakInside Sets or retrieves a string indicating whether a page break is allowed to occur inside the object.
pixelBottom Sets or retrieves the bottom position of the object.
pixelHeight Sets or retrieves the height of the object.
pixelLeft Sets or retrieves the left position of the object.
pixelRight Sets or retrieves the right position of the object.
pixelTop Sets or retrieves the top position of the object.
pixelWidth Sets or retrieves the width of the object.
posBottom Sets or retrieves the bottom position of the object in the units specified by the bottom attribute.
posHeight Sets or retrieves the height of the object in the units specified by the height attribute.
positionposition Sets or retrieves the type of positioning used for the object.
posLeft Sets or retrieves the left position of the object in the units specified by the left attribute.
posRight Sets or retrieves the right position of the object in the units specified by the right attribute.
posTop Sets or retrieves the top position of the object in the units specified by the top attribute.
posWidth Sets or retrieves the width of the object in the units specified by the width attribute.
rightright Sets or retrieves the position of the object relative to the right edge of the next positioned object in the document hierarchy.
ruby-alignrubyAlign Sets or retrieves the position of the ruby text specified by the rt object.
ruby-overhangrubyOverhang Sets or retrieves the position of the ruby text specified by the rt object.
ruby-positionrubyPosition Sets or retrieves the position of the ruby text specified by the rt object.
scrollbar-3dlight-colorscrollbar3dLightColor Sets or retrieves the color of the top and left edges of the scroll box and scroll arrows of a scroll bar.
scrollbar-arrow-colorscrollbarArrowColor Sets or retrieves the color of the arrow elements of a scroll arrow.
scrollbar-base-colorscrollbarBaseColor Sets or retrieves the color of the main elements of a scroll bar, which include the scroll box, track, and scroll arrows.
scrollbar-darkshadow-colorscrollbarDarkShadowColor Sets or retrieves the color of the gutter of a scroll bar.
scrollbar-face-colorscrollbarFaceColor Sets or retrieves the color of the scroll box and scroll arrows of a scroll bar.
scrollbar-highlight-colorscrollbarHighlightColor Sets or retrieves the color of the top and left edges of the scroll box and scroll arrows of a scroll bar.
scrollbar-shadow-colorscrollbarShadowColor Sets or retrieves the color of the bottom and right edges of the scroll box and scroll arrows of a scroll bar.
scrollbar-track-colorscrollbarTrackColor Sets or retrieves the color of the track element of a scroll bar.
floatstyleFloat Sets or retrieves on which side of the object the text will flow.
table-layouttableLayout Sets or retrieves a string that indicates whether the table layout is fixed.
text-aligntextAlign Sets or retrieves whether the text in the object is left-aligned, right-aligned, centered, or justified.
text-align-lasttextAlignLast Sets or retrieves how to align the last line or only line of text in the object.
text-autospacetextAutospace Sets or retrieves the autospacing and narrow space width adjustment of text.
text-decorationtextDecoration Sets or retrieves a value that indicates whether the text in the object has blink, line-through, overline, or underline decorations.
textDecorationBlink Sets or retrieves a Boolean value that indicates whether the object's textDecoration property has a value of "blink."
textDecorationLineThrough Sets or retrieves a Boolean value indicating whether the text in the object has a line drawn through it.
textDecorationNone Sets or retrieves the Boolean value indicating whether the textDecoration property for the object has been set to none.
textDecorationOverline Sets or retrieves a Boolean value indicating whether the text in the object has a line drawn over it.
textDecorationUnderline Sets or retrieves whether the text in the object is underlined.
text-indenttextIndent Sets or retrieves the indentation of the first line of text in the object.
text-justifytextJustify Sets or retrieves the type of alignment used to justify text in the object.
text-kashida-spacetextKashidaSpace Sets or retrieves the ratio of kashida expansion to white space expansion when justifying lines of text in the object.
text-overflowtextOverflow Sets or retrieves a value that indicates whether to render ellipses(...) to indicate text overflow.
text-transformtextTransform Sets or retrieves the rendering of the text in the object.
text-underline-positiontextUnderlinePosition Sets or retrieves the position of the underline decoration that is set through the textDecoration property of the object.
toptop Sets or retrieves the position of the object relative to the top of the next positioned object in the document hierarchy.
unicode-bidiunicodeBidi Sets or retrieves the level of embedding with respect to the bidirectional algorithm.
vertical-alignverticalAlign Sets or retrieves the vertical alignment of the object.
visibilityvisibility Sets or retrieves whether the content of the object is displayed.
widows New for Internet Explorer 8 widows Sets or retrieves the minimum number of lines of a paragraph that must appear at the top of a page.
widthwidth Sets or retrieves the width of the object.
word-breakwordBreak Sets or retrieves line-breaking behavior within words, particularly where multiple languages appear in the object.
word-spacingwordSpacing Sets or retrieves the amount of additional space between words in the object.
word-wrapwordWrap Sets or retrieves whether to break words when the content exceeds the boundaries of its container.
writing-modewritingMode Sets or retrieves the direction and flow of the content in the object.
z-indexzIndex Sets or retrieves the stacking order of positioned objects.
zoomzoom Sets or retrieves the magnification scale of the object.

Remarks

The runtimeStyle object sets and retrieves the format and style of an object, and overrides existing formats and styles in the process. Other than having precedence over the style object and not persisting, the runtimeStyle object is equivalent to the style object.

To change or clear multiple style properties at once, use this object with the cssText property. For example, to change the font color and background color of a DIV element, you could use the following code:


<DIV >
Click on this DIV to change style properties.</DIV>

Example

This example sets a value on the runtimeStyle object to affect the currentStyle object, but not the style object.

<SCRIPT>
function fnChangeValue(sValue){
   if(oDIV.runtimeStyle.backgroundColor == oDIV.style.backgroundColor){
      sValue="";
   }
   oDIV.runtimeStyle.backgroundColor = sValue;
   alert(oDIV.style.backgroundColor +
      "\n" + oDIV.currentStyle.backgroundColor +
      "\n" + oDIV.runtimeStyle.backgroundColor);
}
</SCRIPT>

<DIV ID = "oDIV">
This is a demonstration DIV.
</DIV>

<INPUT TYPE = "button" VALUE = "Change Color" >
This feature requires Microsoft® Internet Explorer 5 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

Standards Information

There is no public standard that applies to this object.

Applies To

A, ABBR, ACRONYM, ADDRESS, APPLET, B, BIG, BLOCKQUOTE, BODY, BR, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, CUSTOM, cssText, DD, DEL, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, FRAME, FRAMESET, hn, HR, HTML, I, IFRAME, IMG, 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, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, NOBR, OBJECT, OL, OPTION, P, PLAINTEXT, PRE, Q, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP

See Also

currentStyle
Tags What's this?: Add a tag
Community Content
 
Add Community Content
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker
DCSIMG