Perfect ScrollBar Plugin Use method

Source: Internet
Author: User

First, Perfect scrollbar function description

Perfect ScrollBar is able to depict an unusual page UI depiction. If you want to be able to design a different page UI design, Perfect scrollbar may be the solution you're looking for, a simple but awesome scroll bar description plugin.
Perfect ScrollBar Download

Second, Perfect ScrollBar main characteristics:

• CSS that does not need to modify any of the elements
• The scroll bar does not affect the original page layout design
• Scroll bar supports full customization
• The size and position of the scroll bar will vary depending on the size or content of the container
• Relies on jquery and several classes of related libraries
• No need to define width and height. It will be fixed at the bottom right of the container.
• You can modify the style of any scroll bar without relying on other scripts
• The scroll bar supports the ' update ' method. If you need to change the position and size of the scroll bar, just call this method to
• Do not use ' scrolltop ' and ' scrollleft ', not with any absolute positioning

Third, Perfect scrollbar use requirements:

• Must have a content element
• The container must have a ' position ' CSS style definition
• The position of the scroll bar must be ' absolute '
Scrollbar-x must have a bottom style definition, scrollbar-must have a style definition of ' right '

Four, Perfect scrollbar instance code:

HTML code

<style> #Demo {position: ' relative ';} </style><div id= ' Demo ' ><div> ... </div></div >javascript$ (' #Demo '). Perfectscrollbar ();

If the container size or position changes, call the following method:

$ (' #Demo '). Perfectscrollbar (' Update ');

If you need to destroy it, call the following:

$ (' #Demo '). Perfectscrollbar (' destroy ');

If you need to scroll to a specific location, call the following:

$ ("#Demo"). ScrollTop (0); $ ("#Demo"). Perfectscrollbar (' Update ');

Perfect ScrollBar Plugin Use method

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.