CSS Basic Property Handling
Method |
Describe |
CSS (name) |
Gets the Name property value of the CSS rule on the element |
CSS (Name,value) CSS (NAME,FN (index,value)) css ({name1:value1,..., namen:valuen}) |
Set the value of the CSS Rule Name property on the element, or use the function argument, without explanation; You can also set multiple CSS properties for the same element at once |
CSS Dimension Property Handling
Method |
Describe |
Height () |
Gets the value of the element's CSS property height |
Width () |
Gets the value of the element's CSS attribute width. These two methods get the actual height width of the element in the page, which is more convenient for mathematical operation. |
Innerheight () |
Gets the actual height value of the inner area of an element, including the inner margin padding |
Innerwidth () |
Gets the actual width value of the inner area of an element |
Outerheight () |
Gets the actual height value of the outer area of the element (including the inner margin padding, border border) |
Outerwidth () |
Gets the actual width value of the outer region of the element. If you want to count the outer margin margin, you can pass in a true parameter, i.e. Outerheight (true) or outerwidth (true) |
CSS position attribute handling
Method |
Describe |
Offset () Offset (coord) Offset (FN (Index,coord)) |
Gets the relative offset of the element in the current window, and returns an object that contains the top and left properties. such as $ ("P"). Offset (). Top. This method is valid only for visible elements. You can also set an offset value, noting that Coord is also an object, such as $ ("P"). Offset ({"Top":, "Left": 15}) |
Position () |
Gets the offset value of the element relative to the most recently positioned ancestor element, and also returns an object that contains the top and left properties. |
ScrollTop () ScrollTop (value) |
Gets the offset value of the vertical scroll bar relative to the top of the element |
ScrollLeft () ScrollLeft (value) |
Gets the offset value of the horizontal scroll bar relative to the leftmost edge of the element. Both methods can set the value, the default unit PX, and if value is negative, the scroll bar moves to the top or the left, and if value exceeds the maximum, it moves to the bottom or right end. |