inblog logo
|
harimmon
    CSS

    [CSS] 6. Flex - wrap

    백하림's avatar
    백하림
    Mar 07, 2025
    [CSS] 6. Flex - wrap
    <!DOCTYPE html> <html lang="ko"> <head> <style> div { border: 1px solid black; padding: 10px; } .f-box { display: flex; flex-wrap: wrap; } .f-box div {} .f-box>div { width: 100px; height: 100px; } </style> </head> <body> <div class="f-box"> <div>1</div> <div>1</div> <div>1</div> <div>1</div> <div>1</div> <div>1</div> <div>1</div> <div>1</div> <div>1</div> <div>1</div> </div> </body> </html>
    notion image
    notion image
    속성
    설명
    display: flex;
    자식 요소들이 수평으로 배치됨
    flex-wrap: wrap;
    요소가 한 줄에 다 들어가지 않으면 줄 바꿈
    Share article

    harimmon

    RSS·Powered by Inblog