0427 과제 23 flex

김태연·2023년 4월 27일

과제

목록 보기
6/14
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            width: 200px; height: 150px;
        }
        #flex {
            display: flex; /* 가로 정렬 */
        }
        .box3 {
            display: flex;
            justify-content: space-around;
            height: 100px;
            align-items: center;
            color: white;
        }
        .box1 {flex: 1; background-color: aqua;}
        .box2 {flex: 4; background-color: beige;}
        .box3 {flex: 0.3; background-color: blue;}
    </style>
</head>
<body>
    <div id="flex">
        <div class="box box1"></div>
        <div class="box box2" style="display: flex; justify-content:right; align-items:center;">
            <div class="box box3">
                <div class="">1</div>
                <div class="">2</div>
                <div class="">3</div>
                <div class="">4</div>
            </div>
        </div>
    </div>
    
</body>
</html>![](https://velog.velcdn.com/images/snowdin/post/dcddaba8-4e14-471e-b52c-c2a562189561/image.png)
profile
꿈꾸는 개발자

0개의 댓글