光るラインで魅せるネオンサイン風アコーディオン

A. 夜の雰囲気・ポップカルチャー系・ポートフォリオなどに映えます。

A. ネオン風のグローエフェクトと黒背景が特徴のユニークなアコーディオンです。

HTML
<div class="accordion-neon">
  <div class="accordion-item">
    <button class="accordion-question">Q. どんなシーンに合いますか?</button>
    <div class="accordion-answer">
      <p>A. 夜の雰囲気・ポップカルチャー系・ポートフォリオなどに映えます。</p>
    </div>
  </div>

  <div class="accordion-item">
    <button class="accordion-question">Q. このデザインの特徴は?</button>
    <div class="accordion-answer">
      <p>A. ネオン風のグローエフェクトと黒背景が特徴のユニークなアコーディオンです。</p>
    </div>
  </div>
</div>
CSS
.accordion-neon {
  max-width: 700px;
  margin: 60px auto;
  font-family: 'Orbitron', sans-serif;
  background: #111;
  padding: 30px;
  border-radius: 12px;
}

.accordion-item {
  margin-bottom: 20px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 8px rgba(0, 255, 255, 0.2);
}

.accordion-question {
  background: transparent;
  border: 2px solid #0ff;
  color: #0ff;
  width: 100%;
  padding: 16px 20px;
  font-size: 16px;
  text-align: left;
  font-weight: bold;
  cursor: pointer;
  position: relative;
  border-radius: 10px;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  text-shadow: 0 0 6px #0ff;
}

.accordion-question:hover {
  box-shadow: 0 0 12px #0ff;
}

.accordion-question::after {
  content: '+';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: #0ff;
  text-shadow: 0 0 6px #0ff;
}

.accordion-question.active::after {
  content: '−';
}

.accordion-answer {
  display: none;
  padding: 16px 20px;
  font-size: 15px;
  color: #ccc;
  background: #1a1a1a;
  box-shadow: inset 0 0 10px rgba(0, 255, 255, 0.1);
}
JavaScript
document.addEventListener('DOMContentLoaded', function () {
  const questions = document.querySelectorAll('.accordion-neon .accordion-question');

  questions.forEach((btn) => {
    btn.addEventListener('click', () => {
      btn.classList.toggle('active');
      const answer = btn.nextElementSibling;
      answer.style.display = answer.style.display === 'block' ? 'none' : 'block';
    });
  });
});

🌟 有料会員限定素材を配布中!

ここでしか手に入らない特別デザイン素材を今すぐチェック!

有料会員ページを見る
目次