← 一覧へ

Popup / 12 レトロゲーム|Retro Gaming

デザイン見本

8bit時代のレトロゲームを彷彿とさせるデザインです。黒背景に緑のモノスペースフォント、二重のボーダーライン、そしてスキャンライン風の背景パターンが懐かしい雰囲気を醸し出します。

実装コード

HTML
<div id="popup-container-12">
                        <button id="popup-btn-12">Retro Gaming</button>
                    </div>
                    <div id="popup-12" class="popup-12">
                        <div class="popup-content-12">
                            <p>Retro Gaming Popup</p>
                            <p>レトロゲーム風のノスタルジックなポップアップです。</p>
                        </div>
                    </div>
CSS
#popup-btn-12 {
    cursor: pointer;
    border: none;
    padding: 12px 24px;
    border-radius: 16px;
    font-weight: 600;
    display: block;
    margin: 0 auto;
    width: 180px;
    color: #fff; background-color: #ff00ff; border: 2px solid #000; font-family: monospace;
}
#popup-btn-12:hover {
    opacity: 0.5;
}
.popup-12 {
    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-12.active {
    opacity: 1;
    visibility: visible;
    bottom: 20px;
    transform: translateX(-50%);
    animation: popupShowHide12 3.4s ease forwards;
}
@keyframes popupShowHide12 {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(100%);
    }
    20% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    80% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(100%);
    }
}
.popup-content-12 {
    background: #222;
    padding: 28px 32px 24px 32px;
    border-radius: 8px;
    text-align: center;
    position: relative;
    min-width: 320px;
    border: 4px solid #00ff00;
    box-shadow: 0 0 0 4px #111, 0 8px 0 0 #00ff00, 0 12px 24px #000;
    font-family: 'Press Start 2P', 'MS Gothic', 'monospace';
    color: #00ff00;
    letter-spacing: 1px;
    text-shadow: 0 0 6px #00ff00, 0 0 2px #fff;
    overflow: hidden;
}
.popup-content-12::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 8px;
    background: repeating-linear-gradient(90deg, #00ff00 0 8px, transparent 8px 16px);
    opacity: 0.7;
}
.popup-content-12::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0; height: 8px;
    background: repeating-linear-gradient(90deg, #00ff00 0 8px, transparent 8px 16px);
    opacity: 0.7;
}
.popup-content-12 p:first-child {
    font-size: 18px;
    font-family: 'Press Start 2P', 'MS Gothic', 'monospace';
    font-weight: bold;
    margin-bottom: 18px;
    color: #00ff00;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 6px #00ff00, 0 0 2px #fff;
    border-bottom: 2px solid #00ff00;
    padding-bottom: 8px;
    position: relative;
}
.popup-content-12 p:last-of-type {
    font-size: 13px;
    color: #00ff00;
    font-family: 'Press Start 2P', 'MS Gothic', 'monospace';
    margin-bottom: 0;
    line-height: 1.7;
    text-shadow: 0 0 4px #00ff00;
    background: rgba(0,0,0,0.3);
    padding: 10px 0 0 0;
    border-top: 1px dashed #00ff00;
}
JS
var btn = document.getElementById('popup-btn-12');
var popup = document.getElementById('popup-12');

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

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