Neon Glow Collapse - MeggiTools
Run
Toggle Theme
Share Link
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Neon Glow Collapse</title> <style> body { font-family: 'Arial', sans-serif; background-color: #1b1b1b; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; color: #fff; } .collapsible-container { width: 80%; max-width: 600px; margin: 20px; background: #333; border-radius: 10px; overflow: hidden; box-shadow: 0 0 20px rgba(0, 255, 255, 0.5); } .collapsible-header { display: flex; justify-content: space-between; align-items: center; background-color: #00ffff; padding: 15px 20px; cursor: pointer; color: #333; font-size: 1.25rem; font-weight: bold; text-shadow: 0 0 5px #00ffff; } .collapsible-header:hover { background-color: #00cccc; } .collapsible-header:after { content: '➕'; font-size: 1.5rem; transition: transform 0.3s ease; } .collapsible-header.collapsed:after { transform: rotate(45deg); } .collapsible-content { display: none; padding: 20px; background-color: #222; color: #fff; border-top: 1px solid #00ffff; } .collapsible-content p { margin: 0; font-size: 1rem; line-height: 1.5; } .collapsible-content img { width: 100%; border-radius: 10px; margin-top: 10px; box-shadow: 0 0 10px rgba(0, 255, 255, 0.5); } .animate-slide { animation: slideDown 0.5s forwards; } @keyframes slideDown { 0% { opacity: 0; transform: translateY(-20px); } 100% { opacity: 1; transform: translateY(0); } } </style> </head> <body> <div class="collapsible-container"> <div class="collapsible-header"> <span>Click to Expand <span>✨</span></span> <i class="icon"></i> </div> <div class="collapsible-content"> <p>Welcome to this neon glow styled collapsible section! 🎨 Enjoy the vibrant colors and the smooth animations.</p> <img src="https://via.placeholder.com/400x200" alt="Placeholder Image"> </div> </div> <script> document.addEventListener("DOMContentLoaded", () => { const header = document.querySelector(".collapsible-header"); const content = document.querySelector(".collapsible-content"); header.addEventListener("click", () => { if (content.style.display === "block") { content.style.display = "none"; header.classList.remove("collapsed"); } else { content.style.display = "block"; content.classList.add("animate-slide"); header.classList.add("collapsed"); } }); }); </script> </body> </html>