Interpreting and analyzing WeChat mini-app components: 4. icon

Source: Internet
Author: User
Mini-program component interpretation and analysis: 4. icon, Icon component description:

Icon is an icon format used for system icons, software icons, etc.. Icon,. Ico. Common software or icons on windows desktops are generally in the ICON format. The icon is used in many places on the application, so that the program can easily express the operation status returned by the program. at a glance, the user can see the meaning returned by the application and improve the user experience, the commonly used icon is provided in the components of the applet. for detailed usage, see the following introduction!

Icon component usage instructions:

When using the icon, use the icon label, and then have the type and size attributes,

For more information about the specific attributes, see the final summary of the attributes. For more information about how to use tags, see the following code.

The running effect of the sample code is as follows:

The following is the WXML code:

[XML]View plain text Copy code

     
          
   
    
Icons
           
   
    
Icon
       
      
          
               
                
                    
     
      
Successful
                     
     
      
Used to indicate successful operation fulfillment
                 
            
           
               
                
                    
     
      
Prompt
                     
     
      
It is used to indicate information prompts. it is also often used to intercept operations without conditions, prompting the user's required information.
                 
            
           
               
                
                    
     
      
Common warning
                     
     
      
Used to indicate the circumstances that will cause certain consequences after the operation
                 
            
           
               
                
                    
     
      
Strong warning
                     
     
      
Used to indicate a situation that will cause serious irreparable consequences after the operation
                 
            
           
               
                
                    
     
      
Wait
                     
     
      
Used to indicate waiting
                 
            
           
               
                
                
                
                
                
                
                
            
       
  
 

The following is the WXSS code:

[CSS]View plain text Copy code

icon{    margin-right: 13px;}.page__bd {    padding-left: 40px;    padding-right: 40px;    text-align: left;}.icon-box{    margin-bottom: 25px;    display: flex;    align-items: center;}.icon-box__ctn{    flex-shrink: 100;}.icon-box__title{    font-size: 20px;}.icon-box__desc{    margin-top: 6px;    font-size: 12px;    color: #888888;}.icon_sp_area {    margin-top: 10px;    text-align: left;}



Main Attributes of the icon component:

Attribute

Type

Default value

Description

Type

String


Icon type, valid values: success, success_no_circle, info, warn, waiting, cancel, download, search, clear

Size

Int

23

Icon size, in px

Color

Color


Icon color, the same as css color

The above is the explanation and analysis of the applet components: 4. details of the icon. 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.