<body>
<div class="box left"> float left</div>
</body>
.box{
width: 150px;
height: 150px;}
.left{
float: left;
}
.clearfix::after{
content:"";
display:block;
clear:both;
}
flex 박스와 gird 출현으로 float 이미지를 위한 역할로 돌아감
요소
축
.flex-container{
display: flex;
}
<style>
.flex-container{
flex-direction: row;
display:flex; 1번그림
flex-wrap: wrap; 2번그림
요소들이 강제로 한줄에 배치되게 할 것인지 여부
flex-direction: column; 3번그림
flex-flow: column wrap; 4번그림, shorthand
}
</style>
.flex-con{
display: flex;
justify-content: center;
align-items: center;
}
.item1{
align-self: flex-start;
order:0;
flex-grow: 1;
}
.item2{
align-self: center;
order:-1;
flex-grow:2;
}
.item1{
align-self: flex-start;
order: 0;
주축에서 남는 공간을 항목들에게 분배
flex-grow:1;
}
.item1{
align-self: flex-start;
order:0;
flex-grow: 1;
}
.item2{
align-self: flex-center;
order:-1;
flex-grow: 2;
}
.items{
align-self: flex-end;
order:1;
flex-grow:3;
}