Dialog / 18 テックフューチャリスティック|Tech Futuristic
デザイン見本
Tech Futuristic Dialog
最先端テクノロジーを体現したダイアログボックスです。
最先端テクノロジーを体現したダイアログボックスです。
実装コード
HTML
<button id="dialog-btn-18">Tech Futuristic<br>Dialog</button>
<div id="dialog-18" 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>最先端テクノロジーを体現したダイアログボックスです。</p>
</div>
<div class="tech-footer">
<button class="tech-btn-secondary">Abort</button>
<button class="tech-btn-primary">Execute</button>
</div>
</div>
</div>
CSS
#dialog-btn-18 {
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-18:hover {
background-color: #0056b3;
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}
#dialog-18 {
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-18 0.3s;
}
#dialog-18 .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-18 2s ease-in-out infinite, floatIn-18 0.6s ease-out;
}
#dialog-18 .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-18 3s linear infinite;
}
#dialog-18 .tech-header {
display: flex;
align-items: center;
gap: 15px;
margin-bottom: 20px;
padding-bottom: 15px;
border-bottom: 1px solid #00ffff;
position: relative;
}
#dialog-18 .tech-icon {
font-size: 2em;
color: #00ffff;
animation: techFlash-18 1.5s ease-in-out infinite;
}
#dialog-18 .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;
}
#dialog-18 .tech-body {
margin-bottom: 25px;
position: relative;
}
#dialog-18 .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);
}
#dialog-18 .tech-footer {
display: flex;
gap: 15px;
justify-content: flex-end;
}
#dialog-18 .tech-btn-secondary,
#dialog-18 .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;
}
#dialog-18 .tech-btn-secondary {
background: transparent;
color: #ff4444;
border-color: #ff4444;
}
#dialog-18 .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);
}
#dialog-18 .tech-btn-primary {
background: linear-gradient(45deg, #00ffff, #0080ff);
color: #000;
border-color: #00ffff;
}
#dialog-18 .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-18 {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes floatIn-18 {
0% {
transform: translateY(50px) scale(0.9);
opacity: 0;
}
100% {
transform: translateY(0) scale(1);
opacity: 1;
}
}
@keyframes techPulse-18 {
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-18 {
0% { transform: translateX(-100%); }
100% { transform: translateX(100%); }
}
@keyframes techFlash-18 {
0%, 100% { opacity: 1; }
50% { opacity: 0.5; }
}
@media (max-width: 768px) {
#dialog-18 .dialog-content {
width: 90%;
margin: 15% auto;
padding: 15px;
}
#dialog-18 .tech-header span {
font-size: 16px;
}
#dialog-18 .tech-body p {
font-size: 14px;
}
}
JS
(function () {
var btn = document.getElementById('dialog-btn-18');
var dialog = document.getElementById('dialog-18');
var closeBtns = dialog ? dialog.querySelectorAll('button') : [];
if (!btn || !dialog) return;
function openDialog() {
dialog.style.display = 'block';
document.body.style.overflow = 'hidden';
}
function closeDialog() {
dialog.style.display = 'none';
document.body.style.overflow = 'auto';
}
btn.addEventListener('click', openDialog);
closeBtns.forEach(function(b) { b.addEventListener('click', closeDialog); });
dialog.addEventListener('click', function (e) {
if (e.target === dialog) {
closeDialog();
}
});
document.addEventListener('keydown', function (e) {
if (e.key === 'Escape' && dialog.style.display === 'block') {
closeDialog();
}
});
})();