
This interface provides access to the methods that are returned when you access the style object. A style object represents the current settings of all possible inline styles for a given element. Inline styles are CSS style assignments that an author applies directly to individual HTML elements using the STYLE attribute. You use the style object to examine these assignments and either make new assignments or change existing ones.
You retrieve the style object by using the IHTMLElement::get_style function. You retrieve the current setting for an inline style by calling member functions of the style object.
The style object does not give access to the style assignments in style sheets. To obtain information about styles in style sheets, you must use the IHTMLStyleSheetsCollection interface to gain access to the individual style sheets defined in the document.
IHTMLStyle Methods
HRESULT get_background(
BSTR *p
);
Retrieves the value of the CSS background attribute for the element.
See also put_background
HRESULT get_backgroundAttachment(
BSTR *p
);
Retrieves the value of the CSS background-attachment attribute for the element.
| fixed | Background image remains fixed. |
| scroll | Background image scrolls with text. |
See also put_backgroundAttachment
HRESULT get_backgroundColor(
VARIANT *p
);
Retrieves the value of the CSS background-color attribute for the element.
See also put_backgroundColor
HRESULT get_backgroundImage(
BSTR *p
);
Retrieves the value of the CSS background-image attribute for the element.
See also put_backgroundImage
HRESULT get_backgroundPosition(
BSTR *p
);
Retrieves the value of the CSS background-position attribute for the element.
See also put_backgroundPosition
HRESULT get_backgroundPositionX(
VARIANT *p
);
Retrieves the x-coordinate of the CSS background-position attribute for the element.
See also put_backgroundPositionX
HRESULT get_backgroundPositionY(
VARIANT *p
);
Retrieves the y-coordinate of the CSS background-position attribute for the element.
See also put_backgroundPositionY
HRESULT get_backgroundRepeat(
BSTR *p
);
Retrieves the value of the CSS background-repeat attribute for the element.
| norepeat | Do not repeat. |
| repeaty | Repeat vertically. |
| repeat | Repeat both horizontally and vertically. |
| repeatx | Repeat horizontally. |
See also put_backgroundRepeat
HRESULT get_border(
BSTR *p
);
Retrieves the value of the CSS border attribute for the element.
See also put_border
HRESULT get_borderBottom(
BSTR *p
);
Retrieves the value of the CSS border-bottom attribute for the element.
See also put_borderBottom
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.