calc small micro-channel processing program does not take effect

Character roughly a little early records describe the problem: the relative positioning of the outer layer is relative, absolute positioning inside a bottom view of the need to value 128rpx, but also the bottom of the adapter is compatible with Apple x, the value is set such that:

bottom: calc(env(safe-area-inset-bottom) + 128rpx)
 
However, the value of Andrews on the bottom is always 0 (View in vconsole in the elements), the ios is not a problem. Guess: calc not take effect in Andrews.
 
Solution: Style written as: bottom: 128rpx; bottom: calc (env (safe-area-inset-bottom) + 128rpx) (Note that the order of the front and rear, can not be replaced)
 
Analysis: calc with the second bottom in ios will take effect, it will directly cover the front bottom. However, since the second value is not recognize calc bottom causes the value is not valid, an invalid value in Andrews case, the bottom is the first direct effect.
 
Checked the css bottom is not the default setting is auto, the parent element has padding, then, will be on the boundary element content, if the bottom is 0: padding will be on the border of the parent element! But ineffective in the applet second bottom, the first directly from a bottom, this mechanism somewhat difficult to understand. . .
 
Only a small program in order to record a strange little problem, write a rough, no screenshots of what the code.

Guess you like

Origin www.cnblogs.com/hjj2ldq/p/11579260.html