|
| 1 | +## justify-content |
| 2 | + |
| 3 | +작성자 : 김동일 |
| 4 | + |
| 5 | +작성일 : 2015-10-30 |
| 6 | + |
| 7 | +css 레퍼런스 설명: |
| 8 | + - justify-content : div 영역 내 flex item 가로 크기를 정의한다. |
| 9 | + |
| 10 | + - syntax : |
| 11 | +```sh |
| 12 | +justify-content: flex-start|flex-end|center|space-between|space-around|initial|inherit; |
| 13 | +``` |
| 14 | + |
| 15 | +flex-start : 기본 값, flex item들이 영역 시작 부분으로 정의한다. |
| 16 | + |
| 17 | +flex-end : flex item들이 영역 끝 부분으로 정의한다. |
| 18 | + |
| 19 | +center : flex item들이 영역 가운데 부분으로 정의한다. |
| 20 | + |
| 21 | +space-between : flex item들이 서로간에 간격을 띄어 정의한다. |
| 22 | + |
| 23 | +space-around : flex item들이 영역 시작과 끝 부분에 간격을 띄면서, 서로간에 간격을 띄어 정의한다. |
| 24 | + |
| 25 | +initial:기본 값으로 set되어 있는 값을 불러온다. |
| 26 | + |
| 27 | +inherit:부모 element에 설정되어 있는 값을 상속 받는다. |
| 28 | + |
| 29 | +sample code : |
| 30 | +```sh |
| 31 | +<!DOCTYPE html> |
| 32 | +<html> |
| 33 | +<head> |
| 34 | +<style> |
| 35 | +#main { |
| 36 | + width: 400px; |
| 37 | + height: 150px; |
| 38 | + border: 1px solid #c3c3c3; |
| 39 | + display: -webkit-flex; /* Safari */ |
| 40 | + -webkit-justify-content: space-around; /* Safari 6.1+ */ |
| 41 | + display: flex; |
| 42 | + justify-content: initial; |
| 43 | +} |
| 44 | + |
| 45 | +#main div { |
| 46 | + width: 70px; |
| 47 | + height: 70px; |
| 48 | +} |
| 49 | +</style> |
| 50 | +</head> |
| 51 | +<body> |
| 52 | + |
| 53 | +<div id="main"> |
| 54 | + <div style="background-color:coral;"></div> |
| 55 | + <div style="background-color:lightblue;"></div> |
| 56 | + <div style="background-color:khaki;"></div> |
| 57 | + <div style="background-color:pink;"></div> |
| 58 | +</div> |
| 59 | + |
| 60 | +<p><b>Note:</b> Internet Explorer 10 and earlier versions do not support the justify-content property.</p> |
| 61 | + |
| 62 | +<p><b>Note:</b> Safari 6.1 (and newer) supports an alternative, the -webkit-justify-content property.</p> |
| 63 | + |
| 64 | +</body> |
| 65 | +</html> |
| 66 | + |
| 67 | +``` |
| 68 | + |
| 69 | +결과 |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | +### 목록 |
| 74 | +* [align-content](align-content.md) |
| 75 | +* [align-items](align-items.md) |
| 76 | +* [align-self](align-self.md) |
| 77 | +* [@keyframes](@keyframes.md) |
| 78 | +* [animation](animation.md) |
| 79 | +* [animation-name](animation-name.md) |
| 80 | +* [animation-duration](animation-duration.md) |
| 81 | +* [animation-timing-function](animation-timing-function.md) |
| 82 | +* [animation-delay](animation-delay.md) |
| 83 | +* [animation-iteration-count](animation-iteration-count.md) |
| 84 | +* [animation-direction](animation-direction.md) |
| 85 | +* [animation-play-state](animation-play-state.md) |
| 86 | +* [backface-visibility](backface-visibility.md) |
| 87 | +* [background-clip](background-clip.md) |
| 88 | +* [background-origin](background-origin.md) |
| 89 | +* [background-size](background-size.md) |
| 90 | +* [border-bottom-left-radius](border-bottom-left-radius.md) |
| 91 | +* [border-bottom-right-radius](border-bottom-right-radius.md) |
| 92 | +* [border-image](border-image.md) |
| 93 | +* [border-image-outset](border-image-outset.md) |
| 94 | +* [border-image-repeat](border-image-repeat.md) |
| 95 | +* [border-image-slice](border-image-slice.md) |
| 96 | +* [border-image-source](border-image-source.md) |
| 97 | +* [border-image-width](border-image-width.md) |
| 98 | +* [border-radius](border-radius.md) |
| 99 | +* [border-top-left-radius](border-top-left-radius.md) |
| 100 | +* [border-top-right-radius](border-top-right-radius.md) |
| 101 | +* [box-shadow](box-shadow.md) |
| 102 | +* [box-sizing](box-sizing.md) |
| 103 | +* [column-count](column-count.md) |
| 104 | +* [column-gap](column-gap.md) |
| 105 | +* [column-rule](column-rule.md) |
| 106 | +* [column-rule-color](column-rule-color.md) |
| 107 | +* [column-rule-style](column-rule-style.md) |
| 108 | +* [column-rule-width](column-rule-width.md) |
| 109 | +* [column-span](column-span.md) |
| 110 | +* [column-width](column-width.md) |
| 111 | +* [columns](columns.md) |
| 112 | +* [flex](flex.md) |
| 113 | +* [flex-basis](flex-basis.md) |
| 114 | +* [flex-direction](flex-direction.md) |
| 115 | +* [flex-flow](flex-flow.md) |
| 116 | +* [flex-grow](flex-grow.md) |
| 117 | +* [flex-shrink](flex-shrink.md) |
| 118 | +* [flex-wrap](flex-wrap.md) |
| 119 | +* [@font-face](@font-face.md) |
| 120 | +* [font-feature-settings](font-feature-settings.md) |
| 121 | +* [hyphens](hyphens.md) |
| 122 | +* [justify-content](justify-content.md) |
| 123 | +* [opacity](opacity.md) |
| 124 | +* [order](order.md) |
| 125 | +* [outline-offset](outline-offset.md) |
| 126 | +* [overflow-wrap](overflow-wrap.md) |
| 127 | +* [overflow-x](overflow-x.md) |
| 128 | +* [overflow-y](overflow-y.md) |
| 129 | +* [@page](@page.md) |
| 130 | +* [perspective](perspective.md) |
| 131 | +* [perspective-origin](perspective-origin.md) |
| 132 | +* [resize](resize.md) |
| 133 | +* [tab-size](tab-size.md) |
| 134 | +* [text-align-last](text-align-last.md) |
| 135 | +* [text-overflow](text-overflow.md) |
| 136 | +* [text-shadow](text-shadow.md) |
| 137 | +* [transform](transform.md) |
| 138 | +* [transform-origin](transform-origin.md) |
| 139 | +* [transform-style](transform-style.md) |
| 140 | +* [transition](transition.md) |
| 141 | +* [transition-delay](transition-delay.md) |
| 142 | +* [transition-duration](transition-duration.md) |
| 143 | +* [transition-property](transition-property.md) |
| 144 | +* [transition-timing-function](transition-timing-function.md) |
| 145 | +* [word-break](word-break.md) |
| 146 | +* [word-wrap](word-wrap.md) |
0 commit comments