본문 바로가기

Web_Project

[CSS] 부트스트랩 활용 - 쇼핑몰 만들기

“부트스트랩을 활용해 웹서비스 만들기“

<!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" />
        <link
            href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
            rel="stylesheet"
            integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
            crossorigin="anonymous"
        />
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.0/font/bootstrap-icons.css" />
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
        <script
            src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
            integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
            crossorigin="anonymous"
        ></script>
        <title>띵동코딩-부트스트랩_파타고니아</title>
        <style>
            @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@100;300;400;500;700;900&display=swap');
            * {
                font-family: 'Noto Sans KR', sans-serif;
            }
            body,
            h1,
            h2,
            h3,
            p,
            a {
                font-weight: normal;
                margin: 0;
                padding: 0;
                text-decoration: none;
            }
            .up {
                background-color: #500778;
                height: 50px;

                display: flex;
                flex-direction: row;
                justify-content: space-between;
                align-items: center;
            }
            .up > a:first-child {
                margin-left: auto;
            }
            .up > a:last-child {
                margin-right: 20px;
            }
            .up > a {
                color: white;
                margin-right: 10px;
            }
            .up > span {
                color: white;
                margin-right: 10px;
            }
            .down {
                height: 70px;

                display: flex;
                flex-direction: row;
                justify-content: space-between;
                align-items: center;
            }.down > img {
                width: 130px;
                margin-left: 20px;
            }
            .down > a {
                margin-left: 80px;
                font-weight: 900;
                color: black;
            }
            .down > form {
                margin-left: 80px;
                margin-right: auto;
                width: 500px;
            }
            .icons {
                font-size: 24px;
            }
            .icons > i {
                margin-right: 20px;
            }
            .main > img {
                width: 100%;
            }
            .items {
                display: flex;
                flex-direction: row;
                justify-content: space-between;
                align-items: flex-start;

                padding: 30px;
            }
            .imgs {
                display: flex;
                flex-direction: row;
                justify-content: center;
                align-items: flex-start;

                margin-right: auto;
                margin-left: 100px;
            }
            .card {
                margin-right: 10px;
            }
            .list-group > span {
                font-size: 24px;
                margin-left: 10px;
            }
            .select {
                width: 120;
                margin-left: auto;
            }
        </style>
    </head>
    <body>
        <div class="gnb">
            <div class="up">
                <a href="#">Climate Goals</a>
                <a href="#">Blue Heart</a>
                <a href="#">Worm Wear</a>
                <span>|</span>
                <a href="#">더보기</a>
            </div>

            <div class="down">
                <img src="https://media-sparta.s3.ap-northeast-2.amazonaws.com/media/images/patagonia_main_logo.png">
                <a href="#">SHOP</a>
                <a href="#">INSIDE PATAGONIA</a>
                <form class="d-flex">
                    <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search">
                </form>
                <div class="icons">
                    <i class="bi bi-question-circle-fill"></i>
                    <i class="bi bi-person-fill"></i>
                    <i class="bi bi-cart-fill"></i>
                </div>
            </div>
        
        </div>
        <div class="main">
            <img src="https://media-sparta.s3.ap-northeast-2.amazonaws.com/media/images/patagonia_main_banner.png">
        </div>

        <div class="items">
            <ul class="list-group list-group-flush">
                <span>WOMEN'S</span>
                <li class="list-group-item">신상품</li>
                <li class="list-group-item">재킷 & 베스트</li>
                <li class="list-group-item">플리스</li>
                <li class="list-group-item">스웨트셔츠 & 후디</li>
                <li class="list-group-item">셔츠</li>
                <li class="list-group-item">티셔츠</li>
                <li class="list-group-item">팬츠 & 레깅스</li>
                <li class="list-group-item">모자 & 액세서리</li>
            </ul>
            
            <div class="imgs">
                <div class="imgs">
                    <div class="card" style="width: 18rem;">
                        <img src="https://media-sparta.s3.ap-northeast-2.amazonaws.com/media/images/patagonia_item_1.png"
                            class="card-img-top" alt="...">
                        <div class="card-body">
                            <p class="card-text">
                                <span>Women Stand Up Overalls</span></br>
                                <span>₩159,000</span>
                            </p>
                        </div>
                    </div>
                    <div class="card" style="width: 18rem;">
                        <img src="https://media-sparta.s3.ap-northeast-2.amazonaws.com/media/images/patagonia_item_2.png"
                            class="card-img-top" alt="...">
                        <div class="card-body">
                            <p class="card-text">
                                <span>Women Ridge Flow Shirt</span></br>
                                <span>₩89,000</span>
                            </p>
                        </div>
                    </div>
                    <div class="card" style="width: 18rem;">
                        <img src="https://media-sparta.s3.ap-northeast-2.amazonaws.com/media/images/patagonia_item_3.png"
                            class="card-img-top" alt="...">
                        <div class="card-body">
                            <p class="card-text">
                                <span>Women All Seasons Hemp Canvas Shorts</span></br>
                                <span>₩119,000</span>
                            </p>
                        </div>
                    </div>
                    </div>
                </div>
                <div class="select">
                    <select class="form-select" aria-label="Default select example">
                        <option selected>상품정렬</option>
                        <option value="1">최신순</option>
                        <option value="2">높은 가격순</option>
                        <option value="3">낮은 가격순</option>
                    </select>
            </div>
        </div>
    </body>
</html>