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