Introduction to how to hide the scroll bar in scroll-view through WeChat applet development

Source: Internet
Author: User
This article describes how to hide the scroll bar in scroll-view by using applet development. when developing a webpage, the default scroll bar in the scroll area is removed to make the page look beautiful. One of the following ways to hide a scroll bar in scroll-view:

First, let's take a look at some attribute components of scroll-view.

Let's take a look at some simple code examples:

  
  
   vertical scroll
   
   
    
    
    
    
     
   
   click me to scroll into view  
   click me to scroll 
  
 
  
  
   horizontal scroll
   
   
    
    
    
    
  
 
var order = ['red', 'yellow', 'blue', 'green', 'red']Page({ data: { toView: 'red', scrollTop: 100 }, upper: function(e) { console.log(e) }, lower: function(e) { console.log(e) }, scroll: function(e) { console.log(e) }, tap: function(e) { for (var i = 0; i < order.length; ++i) {  if (order[i] === this.data.toView) {  this.setData({   toView: order[i + 1]  })  break  } } }, tapMove: function(e) { this.setData({  scrollTop: this.data.scrollTop + 10 }) }})scroll-view

(4) If you want to use the pull-down refresh function, you must use the page scroll instead of scroll-view. in this way, you can also click the top status bar to return to the top of the page.

The above is the details about how to implement scroll-view to hide the scroll bar. For more information, see other related articles in the first PHP community!

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.