How to suspend and fix the action button at the bottom of the WeChat applet?

 http://mydown.yesky.com/news/87296687.html

This chapter mainly introduces how to suspend and fix the operation button at the bottom of the WeChat applet? It is also relatively simple to operate. Those who don’t know it yet, please follow the editor to learn, I hope it will be helpful to you.

  Common ones are the Add to Cart button, the Checkout button, and the Add Address button to the delivery list.

  Taking the delivery address as an example, the Add Address button is suspended at the bottom, so that no matter how many addresses are, they will not be blocked and invisible.

How to suspend and fix the action button at the bottom of the WeChat applet?

  The core code is as follows:

  

  /*Add address button*/

  .address-add {

  position: fixed;

  bottom: 0;

  width: 100%;

  }

  After using position: fixed instead, the width needs to be set to 100%, otherwise it will be a very narrow button.

How to suspend and fix the action button at the bottom of the WeChat applet?

  Considering that the button itself occupies a height of 46px, the address list also needs to be styled as follows

  /

  /*Address list packaging container*/

  .address-list {

  margin-bottom: 46px;

  }

  copy code

  In this way, the last address of the network is set as the default, and the edit and modify buttons can be fully displayed.

How to suspend and fix the action button at the bottom of the WeChat applet?

  The above is all about how to suspend and fix the operation button at the bottom of the WeChat applet. Have you all learned it?

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325392429&siteId=291194637