Introduction to the use of jquery CSS _jquery

Source: Internet
Author: User

JQuery Operations CSS

  • AddClass ()-add one or more classes to the selected element
  • Removeclass ()-deletes one or more classes from the selected element
  • Toggleclass ()-Toggle operation of the Add/Remove class to the selected element
  • CSS ()-Sets or returns one or more style properties for the selected element.

JQuery css () method

〈1〉 return CSS Properties

CSS ("PropertyName");

〈2〉 Set CSS Properties

CSS ("propertyname", "value");

〈2.1〉 Set multiple CSS properties

CSS ({"PropertyName": "Value", "PropertyName": "Value",...});

JQuery Size method

JQuery provides a number of important ways to handle dimensions:

  • Height () Sets or returns the width of the element (excluding the inner margin, border, or outer margin).
  • Height () Sets or returns the height of the element (excluding the inner margin, border, or outer margin).
    Set: $ ("#div1"). Height (500); MORE: $ (window/document). Width/height;
  • Innerwidth () returns the width of the element (including the inner margin).
  • Innerheight () Returns the height of the element (including the inner margin).
  • Outerwidth () returns the width of the element (including the inner margin, border, and outer margin).
  • Outerheight () Returns the height of the element (including the inner margin, border, and outer margin).
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.