<div class="header container d-flex align-items-center justify-content-between">
        <h1 class="logo"><a href="index.html">d'perfume logo</a></h1>
        <ul class="menu d-none d-md-flex align-items-center">
            <li>
                <a href="product.html">
                    <span class="material-icons">
                        store
                    </span>Product
                </a>
            </li>
            <li>
                <a href="#">
                    <span class="material-icons">
                        person
                    </span>log in
                </a>
            </li>
            <li>
                <a href="#">
                    <span class="material-icons">
                        favorite
                    </span>Wishlist
                </a>
            </li>
            <li>
                <a href="#">
                    <span class="material-icons">
                        shopping_cart
                    </span>Cart(3)
                </a>
            </li>
        </ul>
        <div class="labelhide">
            <a class="cart" href="#"><span class="material-icons">shopping_cart</span></a>
            <div class="dropdownlist">
                <a class="dropdown"href="#"><span class="material-icons">reorder</span></a>
            <ul class="dropdown-open">
                <li>
                    <a href="#">
                    <span class="material-icons">
                        store
                    </span>Product
                    </a>
                </li>
                <li>
                    <a href="#">
                        <span class="material-icons">
                            person
                        </span>log in
                    </a>
                </li>
                <li>
                    <a href="#">
                        <span class="material-icons">
                            favorite
                        </span>Wishlist
                    </a>
                </li>
                <li>
                    <a href="#">
                        <span class="material-icons">
                            shopping_cart
                        </span>Cart(3)
                    </a>
                </li>
            </ul>
            </div>
            
        </div>
    </div>
    <div class="product-menu">
        <div class="container d-flex align-items-center">
            <a href="#">CHANEL</a>
            <a href="#">Jo Malone</a>
            <a href="#">Curology</a>
            <a href="#">Dior</a>
            <a href="#">Chloe</a>
            <a href="#">ZARA</a>
        </div>
    </div>
    <ul class="row container">
        <li class="col-12 col-md-6 col-lg-4 col-xl-3 product-info d-flex flex-column justify-content-center">
            <div class="productpage-img"><img src="https://github.com/hexschool/webLayoutTraining1st/blob/master/perfume-week6/products1.jpg?raw=true" alt="No.1"></div>
            <h2>Poppy & Barley</h2>
            <h3>Jo Malone</h3>
            <p>NT$1,380<span>NT$1,580</span></p>
            <div class="shopping-btn d-flex justify-content-start">
                <a href=""> 
                    <span class="material-icons">favorite</span>
                    <span class="material-icons">shopping_cart</span>
                </a><a href=""></a>
            </div>
        </li>
        <li class="col-12 col-md-6 col-lg-4 col-xl-3 product-info d-flex flex-column justify-content-center">
            <div class="productpage-img"><img src="https://github.com/hexschool/webLayoutTraining1st/blob/master/perfume-week6/product2.jpg?raw=true" alt="No.2"></div>
            <h2>Poppy & Barley</h2>
            <h3>Jo Malone</h3>
            <p>NT$1,380<span>NT$1,580</span></p>
            <div class="shopping-btn d-flex justify-content-start">
                <a href="#"> 
                    <span class="material-icons">favorite</span>                    
                </a>
                <a href="#">
                    <span class="material-icons">shopping_cart</span>
                </a>
            </div>
        </li>
        <li class="col-12 col-md-6 col-lg-4 col-xl-3 product-info d-flex flex-column justify-content-center">
            <div class="productpage-img"><img src="https://github.com/hexschool/webLayoutTraining1st/blob/master/perfume-week6/products3.jpg?raw=true" alt="No.3"></div>
            <h2>Poppy & Barley</h2>
            <h3>Jo Malone</h3>
            <p>NT$1,380<span>NT$1,580</span></p>
            <div class="shopping-btn d-flex justify-content-start">
                <a href="#"> 
                    <span class="material-icons">favorite</span>                    
                </a>
                <a href="#">
                    <span class="material-icons">shopping_cart</span>
                </a>
            </div>
        </li>
        <li class="col-12 col-md-6 col-lg-4 col-xl-3 product-info d-flex flex-column justify-content-center">
            <div class="productpage-img"><img src="https://github.com/hexschool/webLayoutTraining1st/blob/master/perfume-week6/products4.jpg?raw=true" alt="No.4"></div>
            <h2>Poppy & Barley</h2>
            <h3>Jo Malone</h3>
            <p>NT$1,380<span>NT$1,580</span></p>
            <div class="shopping-btn d-flex justify-content-start">
                <a href="#"> 
                    <span class="material-icons">favorite</span>                    
                </a>
                <a href="#">
                    <span class="material-icons">shopping_cart</span>
                </a>
            </div>
        </li>
        <li class="col-12 col-md-6 col-lg-4 col-xl-3 product-info d-flex flex-column justify-content-center">
            <div class="productpage-img"><img src="https://github.com/hexschool/webLayoutTraining1st/blob/master/perfume-week6/products5.jpg?raw=true" alt="No.5"></div>
            <h2>Poppy & Barley</h2>
            <h3>Jo Malone</h3>
            <p>NT$1,380<span>NT$1,580</span></p>
            <div class="shopping-btn d-flex justify-content-start">
                <a href="#"> 
                    <span class="material-icons">favorite</span>                    
                </a>
                <a href="#">
                    <span class="material-icons">shopping_cart</span>
                </a>
            </div>
        </li>
        <li class="col-12 col-md-6 col-lg-4 col-xl-3 product-info d-flex flex-column justify-content-center">
            <div class="productpage-img"><img class="leftimg" src="https://github.com/hexschool/webLayoutTraining1st/blob/master/perfume-week6/index4.jpg?raw=true" alt="No.6"></div>
            <h2>Poppy & Barley</h2>
            <h3>Jo Malone</h3>
            <p>NT$1,380<span>NT$1,580</span></p>
            <div class="shopping-btn d-flex justify-content-start">
                <a href="#"> 
                    <span class="material-icons">favorite</span>                    
                </a>
                <a href="#">
                    <span class="material-icons">shopping_cart</span>
                </a>
            </div>
        </li>
        <li class="col-12 col-md-6 col-lg-4 col-xl-3 product-info d-flex flex-column justify-content-center">
            <div class="productpage-img"><img src="https://github.com/hexschool/webLayoutTraining1st/blob/master/perfume-week6/products7.jpg?raw=true" alt="No.7"></div>
            <h2>Poppy & Barley</h2>
            <h3>Jo Malone</h3>
            <p>NT$1,380<span>NT$1,580</span></p>
            <div class="shopping-btn d-flex justify-content-start">
                <a href="#"> 
                    <span class="material-icons">favorite</span>                    
                </a>
                <a href="#">
                    <span class="material-icons">shopping_cart</span>
                </a>
            </div>
        </li>
        <li class="col-12 col-md-6 col-lg-4 col-xl-3 product-info d-flex flex-column justify-content-center">
            <div class="productpage-img"><img src="https://github.com/hexschool/webLayoutTraining1st/blob/master/perfume-week6/products8.jpg?raw=true" alt="No.8"></div>
            <h2>Poppy & Barley</h2>
            <h3>Jo Malone</h3>
            <p>NT$1,380<span>NT$1,580</span></p>
            <div class="shopping-btn d-flex justify-content-start">
                <a href="#"> 
                    <span class="material-icons">favorite</span>                    
                </a>
                <a href="#">
                    <span class="material-icons">shopping_cart</span>
                </a>
            </div>
        </li>
        <li class="col-12 col-md-6 col-lg-4 col-xl-3 product-info d-flex flex-column justify-content-center">
            <div class="productpage-img"><img src="https://github.com/hexschool/webLayoutTraining1st/blob/master/perfume-week6/index3.png?raw=true" alt="No.9"></div>
            <h2>Poppy & Barley</h2>
            <h3>Jo Malone</h3>
            <p>NT$1,380<span>NT$1,580</span></p>
            <div class="shopping-btn d-flex justify-content-start">
                <a href="#"> 
                    <span class="material-icons">favorite</span>                    
                </a>
                <a href="#">
                    <span class="material-icons">shopping_cart</span>
                </a>
            </div>
        </li>
        <li class="col-12 col-md-6 col-lg-4 col-xl-3 product-info d-flex flex-column justify-content-center">
            <div class="productpage-img"><img src="https://github.com/hexschool/webLayoutTraining1st/blob/master/perfume-week6/products10.jpg?raw=true" alt="No.10"></div>
            <h2>Poppy & Barley</h2>
            <h3>Jo Malone</h3>
            <p>NT$1,380<span>NT$1,580</span></p>
            <div class="shopping-btn d-flex justify-content-start">
                <a href="#"> 
                    <span class="material-icons">favorite</span>                    
                </a>
                <a href="#">
                    <span class="material-icons">shopping_cart</span>
                </a>
            </div>
        </li>
        <li class="col-12 col-md-6 col-lg-4 col-xl-3 product-info d-flex flex-column justify-content-center">
            <div class="productpage-img"><img src="https://github.com/hexschool/webLayoutTraining1st/blob/master/perfume-week6/products11.jpg?raw=true" alt="No.11"></div>
            <h2>Poppy & Barley</h2>
            <h3>Jo Malone</h3>
            <p>NT$1,380<span>NT$1,580</span></p>
            <div class="shopping-btn d-flex justify-content-start">
                <a href="#"> 
                    <span class="material-icons">favorite</span>                    
                </a>
                <a href="#">
                    <span class="material-icons">shopping_cart</span>
                </a>
            </div>
        </li>
        <li class="col-12 col-md-6 col-lg-4 col-xl-3 product-info d-flex flex-column justify-content-center">
            <div class="productpage-img"><img src="https://github.com/hexschool/webLayoutTraining1st/blob/master/perfume-week6/products12.jpg?raw=true" alt="No.12"></div>
            <h2>Poppy & Barley</h2>
            <h3>Jo Malone</h3>
            <p>NT$1,380<span>NT$1,580</span></p>
            <div class="shopping-btn d-flex justify-content-start">
                <a href="#"> 
                    <span class="material-icons">favorite</span>                    
                </a>
                <a href="#">
                    <span class="material-icons">shopping_cart</span>
                </a>
            </div>
        </li>
    </ul>
    <div class="page-number d-flex justify-content-center">
        <a href="#">1</a><a href="#">2</a><a href="#">3</a>
    </div>
    <div class="subscribe">
        <div class="info container d-flex align-items-center justify-content-start row g-0">
            <div class="col-12 col-md-6 col-lg-4">
                <h4>記得<br>訂閱以獲取更多資訊!</h4>
                <form class="mailbar d-flex justify-content-between">
                    <label for="email" class="hidden">Email</label>
                    <input type="email" placeholder="Your email address">
                    <input type="submit" value="Subscribe">
                </form>
            </div>            
        </div>
    </div>

   
    <div class="footer">
        <div class="footerbox container d-flex justify-content-between align-items-center">
            <div class="footerbox-left d-flex justify-content-between justify-content-md-start align-items-center">
                <div class="footerlogo"><a href="#">d'perfume logo</a></div>
                <div><p>© 2020. All Rights Reserved.</p></div>
            </div>
            <ul class="footer-right-menu d-none d-md-flex justify-content-center align-items-center">
                <li><a href="#">Product</a></li>
                <li><a href="#">Blog</a></li>
                <li><a href="#">Contact</a></li>
            </ul>
        </div>
    </div>
/*以下與其他分頁同一支scss;*/
/*index頁面:https://codepen.io/superfish195/pen/yLbpEXG*/
/*@import "bootstrap/bootstrap";*/
$primary:#916000;
$secondary:#AC8A46;
/*@import "reset";*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}

/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
  display: block;
}

body {
  line-height: 1;
}

ol, ul {
  list-style: none;
}

blockquote, q {
  quotes: none;
}

blockquote:before, blockquote:after,
q:before, q:after {
  content: '';
  content: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

a {
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

*, *::before, *::after {
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
}

.input:focus {
  outline: none;
}
@mixin textHide{
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-indent: 101%;
}
@mixin bg-setting {
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}
@mixin obj-fit{
    object-fit: cover !important;
}
body{
    font-family: -apple-system,BlinkMacSystemFont, "PingFangTC","Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif;
    line-height: 1.5;
    h2{
        font-weight: bold;
    }
    p{
        font-weight: 300;
    }
    a{
        font-weight: 600;
    }
    
}
.container{
    max-width:1110px;
    margin: 0 auto;
    @media (max-width:1200px) {
        max-width:900px;
    }
    @media (max-width:992px) {
        max-width:800px;
    }
    @media (max-width:768px) {
        max-width:700px;
    }
    @media (max-width:767px) {
        max-width:500px;
    }
    @media (max-width:576px) {
        max-width:400px;
    }
    @media (max-width:375px) {
        max-width:368px;
    }
}
.header{
    .logo a{
        @include textHide;
        background-image: url(https://github.com/hexschool/webLayoutTraining1st/blob/102c91f7b3d8e08005073f54b3283b09a18dc427/perfume-week6/d%E2%80%99Perfume.png?raw=true);
        width: 128px;
        height: 38px;
    }
    .menu li a{
        padding: 16px;
        font-weight: 300;
        color: #8D8D8D;
        display: flex;
        align-items: center;
        font-size: 20px;
        &:hover{
            color: #414141;
        }
        @media (max-width:767px) {
            font-size: 16px;
        }
    }
}
.material-icons{
    color: #8D8D8D;
    font-size: 20px;
}
.banner{
    @include bg-setting;
    background-image:url(https://github.com/hexschool/webLayoutTraining1st/blob/master/perfume-week6/index1.jpg?raw=true);
    background-position: right;
    @media (max-width:767px) {
        background-position: center;
    }
    &-title{
        padding: 295px 0;
        color: white;
        h2{
            font-size: 40px;
            @media (max-width:576px) {
                font-size: 30px;
            }
        }
        p{
            font-size: 24px;
            @media (max-width:576px) {
                font-size: 20px;
            }
        }
        a{
            display: block;
            width: 80%;
            margin-top: 16px;
            font-size: 24px;
            text-align: center;
            color: white;
            border: 2px solid #FFFFFF;
            border-radius: 30px;
            padding: 10px 0;
            &:hover{
                background-color: rgba(255, 255, 255, 0.2);
            }
            @media (max-width:576px) {
                font-size: 20px;
                margin: 16px auto;
            }
        }
        @media (max-width:576px) {
            padding: 100px 0;
        }
    }
    
}
.content{
    margin: 60px auto;
}
.content-box{
    .content-img{
        display: block;
        img{
            display: block;
            @include obj-fit;
            height: 555px;
            width: 100%;
            @media (max-width:992px) {
                height: 500px;
            }
            @media (max-width:768px) {
                height: 400px;
            }
            @media (max-width:576px) {
                height: 350px;
            }
        }
    }
    
    .text{
        padding: 0 105px;
        @media (max-width:992px) {
            padding: 0 60px;
        }
        @media (max-width:768px) {
            padding: 0 20px;
        }
        h2{
            font-size: 32px;
        }
        p{
            margin-top: 16px;
            font-size: 20px;
            
        }
        a{
            margin-top: 16px;
            display: block;
            color: $secondary;
            font-size: 16px;
            span{
                color: #000;
            }
            &:hover{
                color: $primary;
            }
            @media (max-width:768px) {
                padding: 0 20px;
            }
            
        }
        @media (max-width:767px) {
            margin: 20px 0;
            padding: 0 ;
        }
    }
    ol li{
        margin-bottom: 52px;
    }
}
.lastbox{
    .content-img{
        img{
            display: block;
            @include obj-fit;
            height: 1080px;
            width: 100%;
            @media (max-width:576px) {
                height: 500px;
            }
        }
    }
    .text{
        h3{
            font-size: 24px;
            font-weight: bold;
        }
        p{
            font-size: 16px;
        }
        a{
            color: #000;
            font-weight: bold;
            text-align: center;
            padding: 18px 53px;
            border: 2px solid #000000;
            border-radius: 30px;
            &:hover{
                background-color: rgba(0, 0, 0, 0.2);
            }
            @media (max-width:992px) {
                padding: 18px 30px;
            }
            @media (max-width:768px) {
                padding: 18px 30px;
            }
        }
    }
    
}
.product{
    background-color: #E0E0E0;
    padding: 40px 0;
    &-column li{
        text-align: left;
        h2{
            font-size: 24px;
            font-weight: 600;
        }
        h3{
            font-size: 16px;
            font-weight: 300;
            margin-bottom: 16px;
        }
        p{
            font-size: 16px;
            font-weight: 300;
            span{
                color: #8D8D8D;
                text-decoration: line-through;
                margin-left: 8px;
            }
        }
        .sold-out{
            font-size: 24px; 
        }
     }
}
.column-img{
    position: relative;
    img{
        @include obj-fit;
        display: block;
        width: 100%;
        height: 540px;
        &:hover{
            opacity: 0.8;
        }
        @media (max-width:992px) {
            height: 450px;
        }
        @media (max-width:768px) {
            height: 300px;
        }
        @media (max-width:767px) {
            height: 500px;
            padding: 0;
        }
        @media (max-width:576px) {
            height: 400px;
            padding: 0;
        }
        @media (max-width:375px) {
            height: 368px;
            padding: 0;
        }
    }
    &-hover{
        position: absolute;
        display: block;
        z-index: 9999;
        top:0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        width: 330px;
        height: 540px;
        background-color: rgba(0, 0, 0, 0.3);
        &:hover{
            opacity: 0.8;
        }
        p{
            color: white;
            font-weight: 600;
            font-size: 24px;
            text-align: center;
        }
        @media (max-width:1200px) {
            width: 260px;
        }
        @media (max-width:992px) {
            height: 450px;
            width: 226.66px;
        }
        @media (max-width:768px) {
            height: 300px;
            width: 193.33px;
        }
        @media (max-width:767px) {
            height: 500px;
            width: 428px;
        }
        @media (max-width:576px) {
            height:400px;
            width: 328px;
        }
        @media (max-width:375px) {
    
            height:368px;
            width: 288px;
        }
    }      
}

.col-bottom{
    background-position: bottom;
}
.recycling{
    padding: 60px 0;
    &-img img{
        @include obj-fit;
        height: 490px;
        @media (max-width:992px) {
            height: 400px;
        }
        @media (max-width:768px) {
            height: 400px;
        }
    }
    &-text{
        h2{
            font-size: 32px;
            font-weight: bold;
        }
        h3{
            font-size: 20px;
            font-weight: 300;
        }
        p{
            margin-top: 16px;
            font-size: 16px;
        }
        a{
            margin-top: 16px;
            display: block;
            color: #AC8A46;
            font-size: 16px;
            &:hover{
                color: #6d440f;
            }
        }
    }
}
.subscribe{
    @include bg-setting;
    background-image:url(https://github.com/hexschool/webLayoutTraining1st/blob/master/perfume-week6/index10.jpg?raw=true);
    .info{
        padding-top: 312px;
        padding-bottom: 112px;
        font-size: 32px;
        font-weight: 600;
        color: #8D8D8D;
    }
    .mailbar{
        box-shadow: none !important;
        padding: 0;
        font-size: 16px;
        margin-top: 30px;
        input[type="email" i] {
            padding: 0 15px;
            width: 100%;
            border: none;
            border: 2px solid $primary;
            border-radius: 4px 0px 0px 4px;
            background-color: #FFFFFF;
            color: #8D8D8D;
        }
        input[type="submit" i] {
            border-style: none;
            display: block;
            background: $primary;
            color: white;
            padding: 17px 26px;
            border-radius: 0px 4px 4px 0px;
            cursor: pointer;
            &:hover {
                background: #684602;
            }
        }
    }
}
.footer{
    background-color: $primary;
    .footerbox{
        .footerbox-left{
            .footerlogo a{
                background-image: url(https://github.com/hexschool/webLayoutTraining1st/blob/master/perfume-week6/d%E2%80%99Perfumewhite.png?raw=true);
                width: 128px;
                height: 38px;
                @include textHide;
            }
            p{
                font-size: 14px;
                color: #FFFFFF;
                margin-left: 20px;
            }
            @media (max-width:767px) {
                width: 100%;
            }
        }
        .footer-right-menu{
            li a{
                display: block;
                color: white;
                font-size: 20px;
                font-weight: 300;
                padding: 28px 18px;
                &:hover{
                    color: rgb(199, 199, 199);
                }
            }
        }
    }
    
}
.cart{
    display: none;
}
.labelhide{
    display: none;    
}
.hidden{
    display: none !important;
}
.product-menu{
    background: $primary;
    
    .container a{
        color: #ffffff;
        padding: 14px 0;
        margin-right: 28px;
        font-weight: 300;
        &:hover{
            color: $secondary; 
        }
    }
}
.productpage-img{
    margin-top: 80px;
    height: 255px;
    img{
        display: block;
        @include obj-fit;
        height: 100%;
        width: 100%;
    }    
}
.product-info{
    margin-bottom: 58px;
    h2{
        font-size: 24px;
    }
    h3{
        font-size: 16px;
        font-weight: 300;
    }
    p{
        font-size: 16px;
        font-weight: 300;
        span{
            color: #8D8D8D;
            text-decoration: line-through;
            margin-left: 8px;
        }
    }
}
.leftimg{
    object-position: left !important; 
}
.shopping-btn{
    .material-icons{
        color: $primary;
        margin-right: 11px;
    }
}
.page-number{
    margin-bottom: 80px;
    a{
        color: #000000;
        margin: 0 10px;
        &:hover{
            color: $primary;
        }
        &:active{
            color: $secondary;
            text-decoration:underline;
        }        
    }
}
@media (max-width:767px) {
    
    .labelhide{
        display: flex;
        flex-direction: row;
        height: 38px;
    }
    .labelhide a{
        padding: 9px 16px;
    }
    .labelhide ul{
        display: none;
        z-index:999;
    }
    .dropdownlist{
        display: flex;
        flex-direction: row;
    }
    .dropdown-open li a{
        display: flex;
        flex-direction: row;
        justify-content: center;
        background-color: #ffffff;
        padding: 15px;
        color: #8D8D8D;
    }
    .dropdown-open li a:hover{
        background-color: #d6d6d6;
        color: #585858;
    }
    .dropdown-open li a.active{
        background-color: #d6d6d6;
        color: #585858;
    }
}
View Compiled
//以下與其他分頁同一支js
$(document).ready(function() {
	
	$('.dropdown').click(function(event){
		event.preventDefault()
		$('.dropdown').toggleClass('active');
		$('.dropdown-open').slideToggle();
	});
});

External CSS

  1. https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css

External JavaScript

This Pen doesn't use any external JavaScript resources.