Types of layouts Supported
category |
Force width |
Force Height |
Detailed Description |
Responsive |
Is |
Is |
According to the width, height of the value, calculate the proportion of elements, in different screen width to do adaptive, very suitable for pictures, video and other needs of the size of adaptive components |
Fixed-height |
Whether |
Is |
The height of the element is fixed, the width is default or the value is auto, it is more suitable for Mip-carousel |
Fill |
Whether |
Whether |
The size of the element is automatically stretched according to the size of the parent node |
Container |
Whether |
Whether |
The size of the elements is determined by their child node size, HTML-like Div |
Nodisplay |
Whether |
Whether |
element is not displayed, that is, display is none; This element can be applied to: the triggering of his own display of user-dependent clicks |
Fixed |
Is |
Is |
Elements are fixed by width and height and are not subject to media changes |
Use
MIP element add attribute layout, take value to refer to the type above
<mip-img
layout= "Responsive"
Width= "350"
Height= "263"
Popup= ""
alt= "Baidu MIP img"
src= "Yun_qi_img/20161216231233.jpg" >
Layout property Default Rule
width |
Height |
Other Properties |
Default Layout |
Yes |
Yes |
No |
Fixed |
Yes |
Yes |
There are sizes parameters |
Responsive |
None or value is auto |
Yes |
No |
Fixed-height |
No |
No |
No |
Container |
Layout default Value
All MIP elements will have layout. Because the design of the mobile end is mostly blocky, the default layout is container, similar to Div. If there are other style requirements, such as inline, Inline-block. You can modify the element display through style overlay