Home  >  Article  >  WeChat Applet  >  Mini program development to create pop-up menu function (with code)

Mini program development to create pop-up menu function (with code)

php中世界最好的语言
php中世界最好的语言Original
2018-06-13 13:47:203619browse

This time I will bring you the pop-up menu function of mini program development (with code). What are the precautions for mini program development of pop-up menu function? The following is a practical case, let’s take a look.

Requirements

Click the tab bar button to pop up the menu, click again to retract the menu

Problems to be solved

  1. Tab bar three-column style, the tab bar is fixed;

  2. Click the tab bar to pop up the menu, and a transparent mask appears;

  3. The mask priority is under the pop-up box;

  4. Setting the label in the pop-up box;

  5. Hide the scroll bar of the scroll bar

How to solve it?

  1. Flexible layout, horizontal, the three equally divide the entire column;

  2. State monitoring click event, data control hide or show, through rgba Set transparency

  3. Set z-index for the pop-up box;

  4. Elastic layout flex wrap after horizontal arrangement exceeds then space-around control spacing

::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
}

Specific implementation

wxml



  
    
      城市筛选
      
    
    
      职位筛选
      
    
    
      排序方式
      
    
  
  
    
      
        {{item}}
      
    
  
  
    
      
        {{item.title}}
        
          
            {{type}}
          
        
      
      
        
      
    
  
  
    
      智能排序
      时间排序
      薪资排序