FlexBox standard writing:
Supported browsers: IE11,Chrome29+, FireFox 20+, Safari plus prefix-webkit-
Overview:
In total, there are 12attributes;
There are 6 or 5 single attributes about the container, which respectively define thedirection, row, horizontal arrangement, vertical arrangement, blank distribution,and an abbreviation attribute of the element arrangement,Direction, row
There are 6, 5 single attributes about the elements in the container, which respectively define theorder, expansion, contraction, initial size, alignment,# of the elements. ## and a shorthand attribute descriptionElement size
##container: | ##Description|||||||||||||||||||||||||||||||||||||||||||||||
direction :row | column | row-reverse | column-reverse The arrangement direction of elements in the container |
|||||||||||||||||||||||||||||||||||||||||||||||
nowrap | wrap | wrap-reverseElements are displayed in one or more lines |
|||||||||||||||||||||||||||||||||||||||||||||||
:
|
|||||||||||||||||||||||||||||||||||||||||||||||
: flex-start | flex-end| center | space-between | space-aroundThe distribution of elements in the container in the horizontal direction |
|||||||||||||||||||||||||||||||||||||||||||||||
stretch | flex-start | flex-end | center | baseline |
In the vertical direction,The distribution of elements within the container |
||||||||||||||||||||||||||||||||||||||||||||||
align-content:stretch | flex-start | flex-end | center | space-between | space-around |
Distribution of extra white space within the container |
||||||||||||||||||||||||||||||||||||||||||||||
##Container items : |
|||||||||||||||||||||||||||||||||||||||||||||||
order:
|
The arrangement order of elements in the container |
||||||||||||||||||||||||||||||||||||||||||||||
align-self: auto |flex-start | flex-end | center | baseline | stretch |
Override the value of align-items and define its own distribution in the vertical direction |
||||||||||||||||||||||||||||||||||||||||||||||
##flex -grow:
|
The expansion of the space occupied by the element in the container |
||||||||||||||||||||||||||||||||||||||||||||||
##flex-shrink :
|
|||||||||||||||||||||||||||||||||||||||||||||||
When initialized, the size of the element in the container |
#flex: |
||||||||||||||||||||||||||||||||||||||||||||||
Abbreviations for the above three attributes |
* The above
*The first value of each attribute is the default value; *Blue is multiple attribute abbreviation mode; Compatible with IE10: Add prefix -ms-
*It is not recommended to use it before IE10. You can try display:table; About Chrome , FireFox old version supports: FireFox: Replace-webkit-with-moz-to
|
The above is the detailed content of Share a FlexBox standard and compatible writing cheat sheet. For more information, please follow other related articles on the PHP Chinese website!