The problem

The embedded H5 page set margin-bottom in webAPP has the same display effect as expected in the simulator and Android. In iPhone, however, no matter how many margin-bottom layers are nested, it will not work.

why

The resources

Since IOS8 UIView properties of var layoutMargins: UIEdgeInsets designate subview of the View with the edge of the pitch. AutoLayout uses The Margins to place content. The default value is 8pt.

If a View is the RootView of the ViewController, the system automatically sets and manages the Margins, top, and bottom. Margins of 0 pt. So the self-imposed margin-bottom will be invalidated.

The solution

There are two solutions to the margin-bottom failure problem on IOS:

Open the div

Split the bottom div with the height set to achieve the same effect as margin split.

Use padding – bottom

Use padding-bottom to spread out the bottom, which in most cases will satisfy android and IOS display requirements.

I am uneducated, the above is only personal opinion, welcome criticism and discussion ~~