Monaen's WikiCSS Layout 2017-03-17
CSS Style Layout
Flexbox Layout
Introduction
Flexbox layout is most appropriate to the components of an application, and small-scale layouts, while the Grid layout is intended for larger scale layouts.
For examples:1
2
3.app {
display: flex;
}
This rule as-is works with Chrome 29+, IE 11+, and Mozilla 28+. In order to support Safari, the -webkit- prefix must be added:1
2
3
4.app {
display: -webkit-flex; /*to support Safari*/
display: flex;
}
Example:
1 | * { |
Links
Flex-wrap: The CSS flex-wrap property specifies whether flex items are forced into a single line or can be wrapped onto multiple lines. If wrapping is allowed, this property also enables you to control the direction in which lines are stacked.
1
2
3
4
5
6
7
8
9
10/* Syntax */
flex-wrap: nowrap;
flex-wrap: wrap;
flex-wrap: wrap-reverse;
/* Global values */
flex-wrap: inherit;
flex-wrap: initial;
flex-wrap: unset;- Another guide on flex
- visual demos of flex-wrap
Resource
- A Complete Guide to Flexbox: A Complete Guide to Flexbox.
- To verify HTML: The website use for verify your HTML codes.
- To verify CSS: The website use for verify your CSS codes.