search
HomeWeChat AppletMini Program DevelopmentDetailed explanation of scroll-view hidden scroll bar in WeChat applet

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!

Statement
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use