← 一覧へ

Popup / 09 ネオン|Neon

デザイン見本

サイバーパンクや未来的な雰囲気を演出するネオンデザインです。文字や枠線の発光アニメーション、色相が変化するボーダーが、鮮烈な印象を与えます。

実装コード

HTML
<div id="popup-container-9">
  <button id="popup-btn-9">Neon</button>
</div>
<div id="popup-9" class="popup-9">
  <div class="popup-content-9">
    <p>Neon Popup</p>
    <p>光り輝くネオンライト効果のポップアップウィンドウです。</p>
  </div>
</div>
CSS
/* Button Style */
#popup-btn-9 {
  cursor: pointer;
  border: none;
  padding: 12px 24px;
  border-radius: 16px;
  color: #333;
  background-color: #eee;
  font-weight: 600;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
  display: block;
  margin: 0 auto;
  width: 180px;
}

#popup-btn-9:hover {
  opacity: 0.5;
}

/* Popup Style */
.popup-9 {
  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-9.active {
  opacity: 1;
  visibility: visible;
  bottom: 20px;
  transform: translateX(-50%);
  animation: popupShowHide9 3.4s ease forwards;
}

@keyframes popupShowHide9 {
  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-9 {
  background: #000;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  position: relative;
  min-width: 300px;
  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: neonGlow 2s ease-in-out infinite alternate;
}

@keyframes neonGlow {
  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-9::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #00ffff, #ff00ff, #ffff00, #00ffff);
  border-radius: 14px;
  z-index: -1;
  animation: neonBorder 3s linear infinite;
}

@keyframes neonBorder {
  0% {
    filter: hue-rotate(0deg);
  }
  100% {
    filter: hue-rotate(360deg);
  }
}

.popup-content-9 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),
    0 0 30px rgba(0, 255, 255, 0.4);
  animation: neonText 2s ease-in-out infinite alternate;
}

@keyframes neonText {
  from {
    text-shadow:
      0 0 10px rgba(0, 255, 255, 0.8),
      0 0 20px rgba(0, 255, 255, 0.6),
      0 0 30px rgba(0, 255, 255, 0.4);
  }
  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-9 p:last-of-type {
  font-size: 16px;
  color: #ffffff;
  margin-bottom: 25px;
  line-height: 1.6;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}
JS
var btn = document.getElementById('popup-btn-9');
var popup = document.getElementById('popup-9');

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

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