Popup / 17 サイバーパンク|Cyberpunk
デザイン見本
Cyberpunk Popup
サイバーパンク風の未来感あふれるポップアップウィンドウです。
マゼンタとシアンの強いコントラスト、グリッチノイズ(glitch)、スキャンラインを用いたサイバーパンクスタイルです。clip-pathによる変形アニメーションも加わり、不安定で刺激的な視覚効果を演出します。
実装コード
HTML
<div id="popup-container-17">
<button id="popup-btn-17">Cyberpunk</button>
</div>
<div id="popup-17" class="popup-17">
<div class="popup-content-17">
<p>Cyberpunk Popup</p>
<p>サイバーパンク風の未来感あふれるポップアップウィンドウです。</p>
</div>
</div>
CSS
#popup-btn-17 {
cursor: pointer;
border: none;
padding: 12px 24px;
border-radius: 16px;
font-weight: 600;
display: block;
margin: 0 auto;
width: 180px;
color: #fff; background-color: #4caf50;
}
#popup-btn-17:hover {
opacity: 0.5;
}
.popup-17 {
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-17.active {
opacity: 1;
visibility: visible;
bottom: 20px;
transform: translateX(-50%);
animation: popupShowHide16 3.4s ease forwards;
}
@keyframes popupShowHide16 {
0% {
opacity: 0;
transform: translateX(-50%) translateY(100%) scale(0.8) rotateY(-15deg);
}
20% {
opacity: 1;
transform: translateX(-50%) translateY(0) scale(1.1) rotateY(0deg);
}
30% {
transform: translateX(-50%) translateY(0) scale(1) rotateY(0deg);
}
80% {
opacity: 1;
transform: translateX(-50%) translateY(0) scale(1) rotateY(0deg);
}
100% {
opacity: 0;
transform: translateX(-50%) translateY(100%) scale(0.8) rotateY(15deg);
}
}
.popup-content-17 {
background: linear-gradient(135deg, #0c0c0c 0%, #1a1a1a 50%, #0c0c0c 100%);
padding: 35px;
border-radius: 8px;
text-align: center;
position: relative;
min-width: 320px;
border: 2px solid #00ffff;
box-shadow:
0 0 20px rgba(0, 255, 255, 0.5),
0 0 40px rgba(0, 255, 255, 0.3),
0 0 60px rgba(0, 255, 255, 0.1),
inset 0 0 20px rgba(0, 255, 255, 0.1);
animation: cyberpunkGlow 2s ease-in-out infinite alternate;
overflow: hidden;
}
@keyframes cyberpunkGlow {
from {
box-shadow:
0 0 20px rgba(0, 255, 255, 0.5),
0 0 40px rgba(0, 255, 255, 0.3),
0 0 60px rgba(0, 255, 255, 0.1),
inset 0 0 20px rgba(0, 255, 255, 0.1);
}
to {
box-shadow:
0 0 30px rgba(0, 255, 255, 0.7),
0 0 60px rgba(0, 255, 255, 0.5),
0 0 90px rgba(0, 255, 255, 0.3),
inset 0 0 30px rgba(0, 255, 255, 0.2);
}
}
.popup-content-17::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 2px;
background: linear-gradient(90deg, transparent, #00ffff, transparent);
animation: scanLine 2s linear infinite;
}
@keyframes scanLine {
0% {
transform: translateX(-100%);
}
100% {
transform: translateX(100%);
}
}
.popup-content-17::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background:
repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(0, 255, 255, 0.1) 2px, rgba(0, 255, 255, 0.1) 4px),
repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 255, 255, 0.1) 2px, rgba(0, 255, 255, 0.1) 4px);
pointer-events: none;
}
.popup-content-17 p:first-child {
font-size: 24px;
font-weight: bold;
margin-bottom: 15px;
color: #00ffff;
text-shadow:
0 0 10px rgba(0, 255, 255, 0.8),
0 0 20px rgba(0, 255, 255, 0.6);
font-family: 'Courier New', monospace;
letter-spacing: 2px;
animation: cyberpunkText 1.5s ease-in-out infinite alternate;
}
@keyframes cyberpunkText {
from {
text-shadow:
0 0 10px rgba(0, 255, 255, 0.8),
0 0 20px rgba(0, 255, 255, 0.6);
}
to {
text-shadow:
0 0 15px rgba(0, 255, 255, 1),
0 0 25px rgba(0, 255, 255, 0.8),
0 0 35px rgba(0, 255, 255, 0.6);
}
}
.popup-content-17 p:last-of-type {
font-size: 16px;
color: #ffffff;
margin-bottom: 0;
line-height: 1.6;
font-family: 'Courier New', monospace;
text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}
JS
var btn = document.getElementById('popup-btn-17');
var popup = document.getElementById('popup-17');
if (btn && popup) {
btn.addEventListener('click', function () {
popup.classList.add('active');
});
popup.addEventListener('animationend', function () {
popup.classList.remove('active');
});
}