[CSS] display: flex 부모 요소에서 요소들 늘어날 때 줄바꿈 처리

나의 재물운? 연애운은?

AI가 봐주는 내 사주팔자 - 운세박사

https://aifortunedoctor.com/

[CSS] display: flex 부모 요소에서 요소들 늘어날 때 줄바꿈 처리

영리치 0 2,953 2021.07.19 20:10

요소 늘어날 때 자동으로 줄바꿈 처리 하려면

부모 요소에 아래 코드 삽입


main {

width: 200px;

height: 200px;

border: 1px solid lightgray;

display: flex;

flex-flow:wrap;

}


아래와 같이 작성하면 됨.


const SelectWrap = styled.div`
display: flex;
flex-flow: wrap;
margin-top: 3px;
> div:not(:last-child) {
margin-right: 10px;
}
> div {
margin-top: 12px;
}
`;

Comments

나의 재물운? 연애운은?

AI가 봐주는 내 사주팔자 - 운세박사

https://aifortunedoctor.com/

Category
Magazine
훈남/훈녀
 
 
 
상점
Facebook Twitter GooglePlus KakaoStory NaverBand