Front-End Learning jquery Chapter 05--Basic Operations (CSS)

Source: Internet
Author: User

Csscss (NAME|PRO|[,VAL|FN]) 1.9* Access or set the style properties of the matching element.
    • A parameter for access
    • Two parameters for setting

Jquery.csshooks adds a hook directly to JQuery to override the method used to set or get a particular CSS property, either to standardize the CSS property name or to create a custom property.
    • It is intended to standardize CSS property names or to create custom properties.
    • For example, some versions of WebKit-based browsers require the-webkit-border-radius property to set the element's Border-radius, whereas earlier versions of Firefox use the-moz-border-radius attribute. A CSS hook can standardize these prefixed attributes so that the. css () accepts a single, standard attribute name (Border-radius, or syntax with DOM attributes, Borderradius)

Position offset ([coordinates]) Gets or sets the relative offset of the matching element in the current browser window
    • No parameter for Get
    • There is {left: ' + ', top: ' 100 '} parameter is set
Position () Gets or sets the offset of the matching element relative to the parent element.
    • No parameter for Get
    • There is {left: ' + ', top: ' 100 '} parameter is set
    • The returned object contains two integer properties: Top and left. To calculate the results accurately, use pixel units on the padding, border, and fill properties. This method is valid only for visible elements.

ScrollTop ([Val]) Gets or sets the offset of the matching element at the top of the scroll bar
ScrollLeft ([Val]) Gets or sets the offset of the matching element to the left of the scroll bar.
Size
Height ([val|fn]) Gets or sets the height value (px) currently calculated for the first matching element
    • After JQuery 1.2 can be used to get window and document the high
Width ([VAL|FN]) Gets or sets the value (PX) of the current calculation for the first matching element
    • After JQuery 1.2 can be used to obtain the width of window and document
Innerheight () Gets or sets the inner area height of the first matching element, including padding, excluding borders
    • This method is valid for both visible and hidden elements
Innerwidth () Gets or sets the inner area width (including padding, excluding borders) of the first matching element
    • This method is valid for both visible and hidden elements
Outerheight ([options]) Gets or sets the outer height of the first matching element (including padding and borders by default)
    • This method is valid for both visible and hidden elements
Outerwidth ([options]) Gets or sets the outer width of the first matching element (including padding and borders by default)
    • This method is valid for both visible and hidden elements

Front-End Learning jquery Chapter 05--Basic Operations (CSS)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.