Support for the overall use of suspended elements in MIP
Title |
Content |
Type |
General |
Support layout |
Do not use layout |
The required script |
Https://mipcache.bdstatic.com/static/v1/mip-fixed/mip-fixed.js |
Sample
Top Suspension
Rule: Width default screen 100%, height up to 85 pixels
<mip-fixed type= "Top" > Custom content, you can nest other components </mip-fixed> |
Bottom Suspension
Rule: Width default screen 100%, height up to 85 pixels
<mip-fixed type= "Bottom" > Custom content, you can nest other components </mip-fixed> |
left suspension
Rule: Width does not exceed screen 10%, height does not exceed screen 25%, property bottom or top must have a
<mip-fixed type= "left" bottom= "50px" > Custom content, you can nest other components </mip-fixed> |
Right Suspension
Rule: Width does not exceed screen 10%, height does not exceed screen 25%, property bottom or top must have a
<mip-fixed type= "Right" top= "50px" > Custom content, you can nest other components </mip-fixed> |
Support Mip-gototop
<mip-fixed type= "Gototop" > <mip-gototop></mip-gototop> </mip-fixed> |
ways to turn off suspension elements
1, add a custom Id:customid to the mip-fixed label
2, to need to click to close the suspension element tag to add attributes on= "Tap:customid.close"
<mip-fixed type= "Top" id= "Customid" > <div> I'm the top of the fixed</div> <div on= "Tap:customid.close" > I was off button </div> </mip-fixed> |
Property
type
Description: Suspension Type
Required option: Yes
Type: string
Value range: Top/bottom/right/left
Top
Description: Distance from the top of the screen
Required option: No
Type: string
Value Range: Value + unit, for example: px|em|rem|vh|vw|vmin|vmax|cm|mm|q|in|pc|pt
Default value: Auto
Bottom
Description: Distance from the bottom of the screen
Required option: No
Value Range: Value + unit, for example: px|em|rem|vh|vw|vmin|vmax|cm|mm|q|in|pc|pt
Default value: Auto
Attention Matters
Suspension Type
Type is top, bottom category does not need to add attributes: Top/bottom;
The type is left, the right category needs to add at least one Top/bottom attribute, giving precedence to bottom.
Type is gototop category does not require any attributes.
limit the number of fixed elements
Top <= 1
Bottom <= 1
Left + right <= 1
Gototop <= 1