スタイルシートファイル

閉じる
floatingbanner.css
/* ==================================================
   基本スタイル
================================================== */
body {
    font-family: sans-serif;
    padding: 1em;
}


/* ==================================================
   1. 静的クーポンバナーのスタイル
================================================== */
.static-coupon-container {
    width: 100%;
    max-width: 750px;
    border: 1px solid #ccc;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin: 20px auto;
    line-height: 0;
}

.static-coupon-container img {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: bottom;
}

.static-coupon-code-section {
    background-color: #663300;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    line-height: 1.5;
}

.static-coupon-label {
    color: #ffffff;
    font-size: 16px;
}

.static-coupon-code-text {
    color: #ffff00;
    font-size: 22px;
    font-weight: bold;
}

#static-copy-btn {
    background-color: #555;
    color: #fff;
    border: 1px solid #fff;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#static-copy-btn:hover {
    background-color: #777;
}

@media (max-width: 500px) {
    .static-coupon-code-section {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
    }
}


/* ==================================================
   2. 追従バナーのスタイル
================================================== */
.follower-banner {
    position: fixed;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    overflow: hidden;
    display: none;
    cursor: pointer;
}

.follower-banner-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.follower-close-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 20px;
    line-height: 30px;
    text-align: center;
    cursor: pointer;
    z-index: 10;
}

.follower-close-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* PC用スタイル（768px以上） */
.follower-banner {
    right: 50px;
    bottom: 50px;
    width: 300px;
    height: 300px;
}

.follower-banner-image {
    width: 100%;
    height: 200px; /* ★★★ ここを200pxに変更しました ★★★ */
    object-fit: cover;
    vertical-align: bottom;
}

.follower-coupon-section {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 15px;
    box-sizing: border-box;
    text-align: center;
}

.follower-coupon-section p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #555;
    cursor: text;
}

.follower-coupon-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

#follower-coupon-code {
    font-size: 24px;
    font-weight: bold;
    color: #d9534f;
    background-color: #f7f7f7;
    padding: 5px 15px;
    border-radius: 4px;
    cursor: text;
}

#follower-copy-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
    white-space: nowrap;
}

#follower-copy-btn:hover {
    background-color: #0056b3;
}

/* スマホ用スタイル（767px以下） */
@media (max-width: 767px) {
    .follower-banner {
        width: 300px;
        height: 180px;
        right: 15px;
        bottom: 15px;
    }

    .follower-banner-image {
    width: 100%;
    height: 90px;
    object-fit: cover;
    vertical-align: bottom;
}

    .follower-coupon-section {
        padding: 10px;
    }

    .follower-coupon-section p {
        margin-bottom: 12px;
    }
    
    .follower-coupon-row {
        width: auto;
    }
    
    #follower-coupon-code {
        font-size: 20px;
    }
}
更新日時：2025/06/30 17:26:30

このページの先頭へ

  &#169; ECBEING CORP.