ドキュメント

API/1.3/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, in pixels, relative to the document.
offsetParent( )Returns: jQuery
Returns a jQuery collection with the positioned parent of the first matched element.
position( )Returns: Object{top,left}
Gets the top and left position of an element relative to its offset parent.
scrollTop( )Returns: Integer
Gets the scroll top offset of the first matched element.
scrollTop( val )Returns: jQuery
When a value is passed in, the scroll top offset is set to that value on all matched elements.
scrollLeft( )Returns: Integer
Gets the scroll left offset of the first matched element.
scrollLeft( val )Returns: jQuery
When a value is passed in, the scroll left offset is set to that value on all matched elements.
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.
innerHeight( )Returns: Integer
Gets the inner height (excludes the border and includes the padding) for the first matched element.
innerWidth( )Returns: Integer
Gets the inner width (excludes the border and includes the padding) for the first matched element.
outerHeight( margin )Returns: Integer
Gets the outer height (includes the border and padding by default) for the first matched element.
outerWidth( margin )Returns: Integer
Get the outer width (includes the border and padding by default) for the first matched element.