Mui-scroll plug-in usage

Source: Internet
Author: User

http://dev.dcloud.net.cn/mui/ui/#scroll

Scroll (area scrolling)

In app development, the need for Div area scrolling is ubiquitous, but the system default implementation has the following problems:

    • Div scrolling is not supported under Android Platform 4.0
    • Android platform above 4.0 supports DIV scrolling, but does not display scroll bars
    • Popup Layer div Scrolling on iOS platform with event pass problem

As a result, MUI provides additional zone scrolling components, which need to be followed by the following DOM structure

class="mui-scroll-wrapper">    class="mui-scroll  >        <!--here to place the actual DOM content--    </div></div>

quickly roll back to the top of the area with the following code:

MUI ('. Mui-scroll-wrapper'). Scroll (). ScrollTo (0,0,+); // 100 ms scrolling to the top

Scrolling to the top of the code is easier to implement, the coordinate value is set to 0, 0, but to scroll to the bottom, you need to calculate the actual height of the area, so MUI encapsulates the Scrolltobottom method.

MUI ('. Mui-scroll-wrapper'). Scroll (). Scrolltobottom (+); // 100 ms Scroll to the bottom

Mui-scroll plug-in usage

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.