https://idea-hack.com/recipe/bootstrap-4-%e3%83%a2%e3%83%bc%e3%83%80%e3%83%ab%e3%82%b5%e3%83%b3%e3%83%97%e3%83%ab-04/

Bootstrap 4 モーダルサンプル 04

DEMO

RECIPE

HTML
<div class='container'> <button type="button" class="btn trigger" data-toggle="modal" data-target="#exampleModal"> OFFER </button>
    <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header "> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div>
                <div class="modal-body p-0 row">
                    <div class="col-12 col-lg-4 ad p-0"> <img src="https://i.imgur.com/OswSbaT.png" width="100%" height="100%"> </div>
                    <div class="details col-12 col-lg-8">
                        <div class="heading d-flex">
                            <div class="logo"></div>
                            <div class="off"></div>
                        </div>
                        <h2>First time offer</h2>
                        <p><small class="text-muted">RELAX WITH 60 MINS THAI MASSAGE WITH 30% OFF<br /> EXCLUSIVE AT JUST <strong>RS 999</strong></small></p>
                        <div class="text-muted hurry"><small>Hurry. book now. Limited time offer</small></div>
                        <div class="d-flex mt-2 mb-5"> <button type="button" class="btn booking"><label><strong>Books<br /></strong><small class="text-muted">Online</small></label></button> <button type="button" class="btn booking ml-4"><label><strong>Store<br /></strong><small class="text-muted">Locator</small></label></button> </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
CSS
html {
    height: 100%;
    background: linear-gradient(90deg, rgb(234, 199, 243) 0%, rgb(243, 141, 240) 100%)
}

head,
body {
    background: linear-gradient(90deg, rgb(234, 199, 243) 0%, rgb(243, 141, 240) 100%)
}

.container {
    display: flex;
    justify-content: center;
    margin-top: 200px;
    background: transparent
}

.trigger {
    background-color: black;
    color: red
}

.modal,
.fade,
.show {
    background-color: lightgray;
    padding-left: 15px;
    padding-right: 15px
}

.modal-content {
    background: transparent;
    border: none;
    padding: 0 19px
}

.close {
    position: relative;
    top: 48px;
    left: 13px;
    z-index: 1;
    font-size: 30px;
    font-weight: 100;
    line-height: 1;
    color: gray
}

.modal-header {
    border: none
}

.modal-body {
    border: none;
    background-color: white;
    padding-bottom: 5px
}

.logo {
    width: 100px;
    height: 100px;
    background: url(https://res.cloudinary.com/dxfq3iotg/image/upload/v1576118709/83225325-beauty-spa-logo-design.jpg);
    background-size: contain;
    position: relative;
    right: 14px
}

.off {
    margin-top: 25px;
    width: 50px;
    height: 50px;
    background: url(https://res.cloudinary.com/dxfq3iotg/image/upload/v1576118728/30-off-white-background-special-offer-great-offer-sale-thirty-percent-off-promotional_59529-691.jpg);
    background-size: contain
}

.heading {
    justify-content: space-between
}

.modal-footer {
    border: none
}

.btn.focus,
.btn:focus {
    outline: 0;
    box-shadow: none !important
}

.close.focus,
.close:focus {
    outline: 0;
    box-shadow: none !important
}

.hurry {
    margin-top: 30px
}

.booking {
    background-color: white;
    border: 2px solid lightgray;
    width: 150px;
    border-radius: 0px
}

.booking:hover {
    background-color: #ECEFF1;
    border: 2px solid black
}

@media (min-width:599px) {
    .modal-dialog {
        max-width: 47rem
    }

    .details {
        padding: 0 114px
    }

    .off {
        position: absolute;
        bottom: 150px;
        left: 25px
    }
}
Source
  • https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css
  • https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js
  • https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js