[JQuery] css operations, jquerycss

Source: Internet
Author: User

[JQuery] css operations, jquerycss

I. Preface

Next, let's continue learning about JQuery in the previous chapter.

 

Ii. Content

Css sets or returns the style attribute $(selector).css (css-property-name) ((selector).css (css-property-name, value) ((selector).css ({property: value, property: value ,...}) ((selector).css (css-property-name, function (index, currentvalue) height sets or returns the height of the matching element $ (selector ). height () $ (selector ). height (num) $ (selector ). height (function (index, currentheight) width sets or returns the width of the matching element $ (selector ). width () $ (selector ). width (num) $ (selector ). width (function (index, currentwidth) position returns the position (offset) of the matching element relative to the parent element. The returned object contains two integer attributes: top and left $ (selector ). position () scrollLeft setting or return the offset of the matching element to the left of the scroll bar $ (selector ). scrollLect () $ (selector ). scrollLeft (new-position) scrollTop setting or return the vertical element of the scroll bar matching the element $ (selector ). scrollTop () $ (selector ). scrollTop (offset) offset returns or sets the offset of the matching element to the document $ (selector ). offset () $ (selector ). offset (value) $ (selector ). offset (function (index, currentoffset) offsetParent returns the most recent ancestor location element $ (selector ). offsetParent ()

 

Related Article

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.