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
Tab bar three-column style, the tab bar is fixed;
Click the tab bar to pop up the menu, and a transparent mask appears;
The mask priority is under the pop-up box;
Setting the label in the pop-up box;
Hide the scroll bar of the scroll bar
How to solve it?
Flexible layout, horizontal, the three equally divide the entire column;
State monitoring click event, data control hide or show, through rgba Set transparency
Set z-index for the pop-up box;
Elastic layout flex wrap after horizontal arrangement exceeds then space-around control spacing
1 2 3 4 5 |
|
Specific implementation
wxml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
|
wxss
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
|
js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
|
I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website!
Recommended reading:
Angular filter making Data case conversion
The above is the detailed content of Mini program development to create pop-up menu function (with code). For more information, please follow other related articles on the PHP Chinese website!