wonderfan / javascript

Explore the power of HTML,CSS and JavaScript
1 stars 0 forks source link

flex box layout #53

Closed wonderfan closed 9 years ago

wonderfan commented 9 years ago

The flex property specifies the length of the item, relative to the rest of the flexible items inside the same container.

The flex property is a shorthand for the flex-grow, flex-shrink, and the flex-basis properties.

wonderfan commented 9 years ago

flex-grow A number specifying how much the item will grow relative to the rest of the flexible items

flex-shrink A number specifying how much the item will shrink relative to the rest of the flexible items

flex-basis The length of the item. Legal values: "auto", "inherit", or a number followed by "%", "px", "em" or any other length unit

wonderfan commented 9 years ago

The prime characteristic of the flex container is the ability to modify the width or height of its children to fill the available space in the best possible way on different screen sizes.

wonderfan commented 9 years ago

The flex layout is constituted of parent container referred as flex container and its immediate children which are called flex items.

wonderfan commented 9 years ago

The good tutorial: https://scotch.io/tutorials/a-visual-guide-to-css3-flexbox-properties

wonderfan commented 9 years ago

very detailed guide: https://css-tricks.com/snippets/css/a-guide-to-flexbox/

wonderfan commented 9 years ago

Learn the layout: http://learnlayout.com/flexbox.html