WeChat applet component progress bar interpretation and analysis

Source: Internet
Author: User
This article introduces the progress bar interpretation and analysis of the applet component progress Progress Bar component description:

The progress bar indicates the current progress of the task, allowing you to visually perceive the task execution.
The progress bar of progress is a component of the applet, which is similar to the progress bar of HTML5.


The sample code of the progress bar component is as follows:

The following is the WXML code:

 
     
  
   
Q: When will an old driver drive?
      
  
 


The following is the JS code:

Page ({data :{}, onLoad: function (options) {// parameters brought about by Page initialization options for Page jump}, onReady: function () {// page rendering complete}, onShow: function () {// page display}, onHide: function () {// page hiding}, onUnload: function () {// page closed }})


The following is the WXSS code:

.content{  padding-top: 20px;}.con-text{  display: block;  padding-bottom: 20px;}.con-pro{  color: cornflowerblue;}

The following is the WXML code:

 
     
  
   
Percentage not displayed
      
      
  
   
Display percentage (percentage font style is controlled by class)
      
      
  
   
Change the width of the progress bar: 15px
      
      
  
   
Change progress bar color (#): Black
      
      
  
   
Change progress bar color (defined): Orange
      
      
  
   
Attribute superposition
      
  
 



The following is the JS code:

Page ({data :{}, onLoad: function (options) {// parameters brought about by Page initialization options for Page jump}, onReady: function () {// page rendering complete}, onShow: function () {// page display}, onHide: function () {// page hiding}, onUnload: function () {// page closed }})


The following is the WXSS code:

.content{  padding-top: 20px;}.con-text{  display: block;  padding-bottom: 10px;}.con-pro{  padding-bottom: 30px;  color: cornflowerblue;}

The following is the WXML code:

 
     
  
   
See my launch
      
  
 


The following is the JS code:

Page ({data :{}, onLoad: function (options) {// parameters brought about by Page initialization options for Page jump}, onReady: function () {// page rendering complete}, onShow: function () {// page display}, onHide: function () {// page hiding}, onUnload: function () {// page closed }})



The following is the WXSS code:

.content{  padding-top: 20px;}.con-text{  display: block;  padding-bottom: 10px;}.con-pro{  padding-bottom: 30px;  color: cornflowerblue;}

Main properties of the progress bar:

Attribute

Type

Default value

Description

Percent Float 0 0-Percentage
Show-info Boolean False Percentage is displayed on the right of the progress bar, and the attribute is true.
Color Color #09BB07 Indicates the progress bar color, which can be # or the color attribute has been defined.
Stroke-width Number 6 Unit: px, indicating the line width displayed on the progress bar
Active Boolean False Indicates the animation of the progress bar from left to right, and the animation is stopped to the set percentage. if the attribute is written, the value is true.

The above is the detailed explanation and analysis of the progress bar of the mini-program component. 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.