22.04.20も紛らわしいFLEX…
8392 ワード
FLEXのコンセプトをマスター!!
<div class="container">
<div class="item">1</div>
<div class="item">2</div>
<div class="item">3</div>
</div>
.container {
background-color:royalblue;
display:flex;
}
.container .item {
width:100px;
height:100px;
border:3px dashed red;
background-color:orange;
}
結果
flex-directionタイプ

flex-wrap

justify-content
主軸の位置合わせ

align-content
交差軸の複数行を整列するには、次の手順に従います.

align-items

を選択します。
<div class="container">
<div class="item">1</div>
<div class="item">2</div>
<div class="item">3</div>
</div>
.container {
background-color:royalblue;
display:flex;
justify-content:center;
width:500px;
height:300px;
align-items:center;
}
.container .item {
width:100px;
height:100px;
border:3px dashed red;
background-color:orange;
}

Reference
この問題について(22.04.20も紛らわしいFLEX…), 我々は、より多くの情報をここで見つけました https://velog.io/@qjagkrdldi/22.04.20-해도해도-헷갈리는-FLEXテキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol