Detailed explanation of scroll-view hidden scroll bar in WeChat applet

高洛峰
Release: 2017-02-14 14:46:33
Original
2753 people have browsed it

1: scroll-view hides the scroll bar

When writing a web page, you often choose to remove the default scroll bar in the scroll area for the sake of the beauty of the page. Here, This is one of the methods to remove scroll bars for small programs:

scroll-view.wxml:

微信小程序 scroll-view隐藏滚动条详解

scroll-view.wxss

微信小程序 scroll-view隐藏滚动条详解

scroll-view.js

微信小程序 scroll-view隐藏滚动条详解

The final display effect is as follows;

微信小程序 scroll-view隐藏滚动条详解

Note:

(1) Textarea, mao, canvas, and video components cannot be used in scroll-view

(2) The priority of scroll-init-view is higher than scroll-top

(3) The onPullDownRefresh event cannot be triggered in scroll-view

(4) If you want to use pull-down refresh, you must use the scroll of the page instead of scroll-view, so it can also pass Click the top status bar to return to the top of the page

Thank you for reading, I hope it can help you, thank you for your support of this site!

For more detailed explanations of scroll-view hidden scroll bars in the WeChat applet, please pay attention to the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!