jQuery: The Write Less, Do More JavaScript Library

API/1.2/CSS

From jQuery JavaScript Library

(Redirected from CSS)
Jump to: navigation, search

NameType
CSS:

NameType
css( name ) Returns: String
Return a style property on the first matched element.
css( properties ) Returns: jQuery
Set a key/value object as style properties to all matched elements.
css( name, value ) Returns: jQuery
Set a single style property to a value on all matched elements.
Positioning:

NameType
offset( ) Returns: Object{top,left}
Get the current offset of the first matched element relative to the viewport.
Height and Width:

NameType
height( ) Returns: Integer
Get the current computed, pixel, height of the first matched element.
height( val ) Returns: jQuery
Set the CSS height of every matched element.
width( ) Returns: Integer
Get the current computed, pixel, width of the first matched element.
width( val ) Returns: jQuery
Set the CSS width of every matched element.