본문 바로가기
CSS

flex-Properties for the Parent(flex container)

by rienna 2019. 7. 5.

https://webclub.tistory.com/259?category=541913

 

Flexible box Layout - 플렉스 박스 #1

플렉스 박스 레이아웃 이번 포스팅에서는 새로운 레이아웃 모듈 중에 가장 포괄적인 격자 레이아웃과 함께 유동적인 레이아웃 모듈 또는 플렉스박스라고 하는 모듈에 대해 소개하고자 하는데, 이 모듈은 보다 복잡..

webclub.tistory.com

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

 

A Complete Guide to Flexbox | CSS-Tricks

Our comprehensive guide to CSS flexbox layout. This complete guide explains everything about flexbox, focusing on all the different possible properties for the parent element (the flex container) and the child elements (the flex items). It also includes hi

css-tricks.com

 

the flex container is the outer element which holds the flex items

 

 

.container { display: flex; /* or inline-flex */ }

 

 

flex-direction

the four possible values of flex-direction being shown: top to bottom, bottom to top, right to left, and left to right

.container { flex-direction: row | row-reverse | column | column-reverse; }

 

 

 

 

 

flex-wrap

two rows of boxes, the first wrapping down onto the second

.container { flex-wrap: nowrap | wrap | wrap-reverse; }

 

 

 

flex-flowThis is a shorthand for the flex-direction and flex-wrapproperties

flex-flow: <‘flex-direction’> || <‘flex-wrap’>

 

 

 

justify-content

flex items within a flex container demonstrating the different spacing options

.container { justify-content: flex-start | flex-end | center | space-between | space-around | space-evenly; }

 

 

 

align-items

 

demonstration of differnet alignment options, like all boxes stuck to the top of a flex parent, the bottom, stretched out, or along a baseline

.container { align-items: stretch | flex-start | flex-end | center | baseline; }

 

 

align-content

 

examples of the align-content property where a group of items cluster at the top or bottom, or stretch out to fill the space, or have spacing.

.container { align-content: flex-start | flex-end | center | space-between | space-around | stretch; }

 

 

 

'CSS' 카테고리의 다른 글

column-count:300px;  (0) 2019.07.11
position:sticky  (0) 2019.07.11
shape-outside:circle(50%);  (0) 2019.07.11
display:flow-root  (0) 2019.07.11
css transition  (0) 2019.07.05
css transform  (0) 2019.07.05
@keyframes  (0) 2019.07.04
이미지 여백 문제  (0) 2017.12.13