← 一覧へ

Popup / 15 コミック風|Comic Style

デザイン見本

アメリカンコミックの吹き出しをモチーフにしたユニークなデザインです。不規則な形のボーダーと手書き風フォント、飛び出してくるようなアニメーションが、見る人を驚かせます。

実装コード

HTML
<div id="popup-container-15">
                        <button id="popup-btn-15">Comic Style</button>
                    </div>
                    <div id="popup-15" class="popup-15">
                        <div class="popup-content-15">
                            <p>Comic Style Popup</p>
                            <p>コミック風の吹き出しデザインのポップアップウィンドウです。</p>
                        </div>
                    </div>
CSS
#popup-btn-15 {
    cursor: pointer;
    border: none;
    padding: 12px 24px;
    border-radius: 16px;
    font-weight: 600;
    display: block;
    margin: 0 auto;
    width: 180px;
    color: #000; background-color: #ffeb3b; border: 2px solid #000; box-shadow: 4px 4px 0px #000;
}
#popup-btn-15:hover {
    opacity: 0.5;
}
.popup-15 {
    position: fixed;
    bottom: -100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    max-width: 90%;
    max-height: 90%;
}
.popup-15.active {
    opacity: 1;
    visibility: visible;
    bottom: 20px;
    transform: translateX(-50%);
    animation: popupShowHide15 3.4s cubic-bezier(.68,-0.55,.27,1.55) forwards;
}
@keyframes popupShowHide15 {
    0% { opacity: 0; transform: translateX(-50%) scale(0.7) rotate(-6deg); }
    20% { opacity: 1; transform: translateX(-50%) scale(1.05) rotate(2deg); }
    80% { opacity: 1; transform: translateX(-50%) scale(1) rotate(0deg); }
    100% { opacity: 0; transform: translateX(-50%) scale(0.7) rotate(6deg); }
}
.popup-content-15 {
    background: #fff;
    padding: 32px 36px;
    border-radius: 32px 16px 32px 16px;
    text-align: center;
    min-width: 300px;
    box-shadow: 0 8px 32px #ff9966, 0 2px 8px rgba(0,0,0,0.08);
    border: 4px solid #ff5e62;
    font-size: 20px;
    position: relative;
    font-family: 'Comic Sans MS', 'Comic Sans', cursive;
}
.popup-content-15::before {
    content: '';
    position: absolute;
    top: -18px; left: 50%;
    transform: translateX(-50%);
    width: 60px; height: 30px;
    background: #fff;
    border: 4px solid #ff5e62;
    border-radius: 50% 50% 0 0;
    z-index: 1;
    box-shadow: 0 -4px 0 #ff9966;
}
.popup-content-15 p:first-child {
    font-size: 28px;
    margin-bottom: 12px;
    color: #ff5e62;
    font-weight: bold;
    letter-spacing: 2px;
    text-shadow: 2px 2px 0 #fff, 4px 4px 0 #ff9966;
}
.popup-content-15 p:last-of-type {
    font-size: 16px;
    color: #ff5e62;
    margin-bottom: 0;
    line-height: 1.7;
    font-family: 'Comic Sans MS', 'Comic Sans', cursive;
}
JS
var btn = document.getElementById('popup-btn-15');
var popup = document.getElementById('popup-15');

if (btn && popup) {
  btn.addEventListener('click', function () {
    popup.classList.add('active');
  });

  popup.addEventListener('animationend', function () {
    popup.classList.remove('active');
  });
}