ダイアログボックス:テクノロジー|Dialog Box: Tech Futuristic

Tech Futuristic Dialog

This dialog embodies cutting-edge technology with circuit patterns, neon accents, and advanced UI elements that represent the future of digital interfaces.

HTML
<div class="container">
    <button class="dialog-btn" id="dialog-btn">Tech Futuristic<br>Dialog</button>
</div>

<div id="dialog" class="dialog">
    <div class="dialog-content">
        <div class="tech-header">
            <div class="tech-icon">⚡</div>
            <span>Tech Futuristic Dialog</span>
        </div>
        <div class="tech-body">
            <p>This dialog embodies cutting-edge technology with circuit patterns, neon accents, and advanced UI elements that represent the future of digital interfaces.</p>
        </div>
        <div class="tech-footer">
            <button class="tech-btn-secondary">Abort</button>
            <button class="tech-btn-primary">Execute</button>
        </div>
    </div>
</div>
CSS
.container {
    text-align: center;
}

.dialog-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 200px;
    min-height: 60px;
    display: inline-block;
    text-align: center;
    line-height: 1.4;
    vertical-align: middle;
}

.dialog-btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.dialog {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.dialog-content {
    width: 80%;
    max-width: 500px;
    margin: 10% auto;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.9), 
        rgba(20, 20, 20, 0.9), 
        rgba(0, 0, 0, 0.9));
    border: 2px solid #00ffff;
    border-radius: 15px;
    padding: 30px;
    position: relative;
    box-shadow: 
        0 0 30px rgba(0, 255, 255, 0.3),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
    animation: techPulse 2s ease-in-out infinite, floatIn 0.6s ease-out;
}

.dialog-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(90deg, transparent 0%, rgba(0, 255, 255, 0.1) 50%, transparent 100%);
    border-radius: 15px;
    animation: techScan 3s linear infinite;
}

.tech-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #00ffff;
    position: relative;
}

.tech-icon {
    font-size: 2em;
    color: #00ffff;
    animation: techFlash 1.5s ease-in-out infinite;
}

.tech-header span {
    font-size: 1.5em;
    font-weight: 600;
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    font-family: 'Courier New', monospace;
}

.tech-body {
    margin-bottom: 25px;
    position: relative;
}

.tech-body p {
    color: #ffffff;
    line-height: 1.6;
    font-size: 1em;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

.tech-footer {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.tech-btn-secondary,
.tech-btn-primary {
    padding: 12px 24px;
    border: 2px solid;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tech-btn-secondary {
    background: transparent;
    color: #ff4444;
    border-color: #ff4444;
}

.tech-btn-secondary:hover {
    background: rgba(255, 68, 68, 0.1);
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.3);
    transform: translateY(-2px);
}

.tech-btn-primary {
    background: linear-gradient(45deg, #00ffff, #0080ff);
    color: #000;
    border-color: #00ffff;
}

.tech-btn-primary:hover {
    background: linear-gradient(45deg, #0080ff, #00ffff);
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.5);
    transform: translateY(-2px);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes floatIn {
    0% {
        transform: translateY(50px) scale(0.9);
        opacity: 0;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes techPulse {
    0%, 100% {
        box-shadow: 
            0 0 30px rgba(0, 255, 255, 0.3),
            inset 0 0 20px rgba(0, 255, 255, 0.1);
    }
    50% {
        box-shadow: 
            0 0 50px rgba(0, 255, 255, 0.5),
            inset 0 0 30px rgba(0, 255, 255, 0.2);
    }
}

@keyframes techScan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes techFlash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@media (max-width: 768px) {
    .dialog-content {
        width: 90%;
        margin: 15% auto;
        padding: 15px;
    }
    
    .tech-header span {
        font-size: 16px;
    }
    
    .tech-body p {
        font-size: 14px;
    }
}
JavaScript
document.addEventListener('DOMContentLoaded', function() {
    // ダイアログボタンのイベントリスナーを設定
    const dialogBtn = document.getElementById('dialog-btn');
    const dialog = document.getElementById('dialog');
    
    dialogBtn.addEventListener('click', function() {
        dialog.style.display = 'block';
        // スクロールを無効化
        document.body.style.overflow = 'hidden';
    });
    
    // 閉じるボタンのイベントリスナーを設定
    const closeButtons = document.querySelectorAll('.tech-btn-secondary, .tech-btn-primary');
    
    closeButtons.forEach(button => {
        button.addEventListener('click', function() {
            dialog.style.display = 'none';
            // スクロールを有効化
            document.body.style.overflow = 'auto';
        });
    });
});
よかったらシェアしてね!
  • URLをコピーしました!
  • URLをコピーしました!
目次