Neon Glow Heatmap - 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 Heatmap</title> <style> body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #121212; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; color: #ffffff; } .heatmap-container { display: grid; grid-template-columns: repeat(10, 1fr); grid-gap: 5px; padding: 20px; background: #1c1c1c; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5); border-radius: 10px; } .heatmap-cell { width: 40px; height: 40px; display: flex; justify-content: center; align-items: center; border-radius: 5px; cursor: pointer; transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out; color: #000000; font-size: 20px; } .heatmap-cell:hover { transform: scale(1.1); box-shadow: 0 0 15px rgba(255, 255, 255, 0.7); } .heatmap-cell[data-value="1"] { background-color: #f0f; box-shadow: 0 0 10px #f0f; } .heatmap-cell[data-value="2"] { background-color: #0ff; box-shadow: 0 0 10px #0ff; } .heatmap-cell[data-value="3"] { background-color: #ff0; box-shadow: 0 0 10px #ff0; } .heatmap-cell[data-value="4"] { background-color: #f80; box-shadow: 0 0 10px #f80; } .heatmap-cell[data-value="5"] { background-color: #f00; box-shadow: 0 0 10px #f00; } @keyframes glow { 0% { transform: scale(0.9); } 50% { transform: scale(1.1); } 100% { transform: scale(0.9); } } .emoji { margin-left: 5px; animation: glow 1s infinite; } .icon { margin-left: 5px; color: #FFD700; } </style> </head> <body> <div class="heatmap-container" id="neon-heatmap"> <!-- Cells will be dynamically created here --> </div> <script> function generateHeatmapData(rows, cols) { const data = []; for (let i = 0; i < rows; i++) { const row = []; for (let j = 0; j < cols; j++) { row.push(Math.floor(Math.random() * 5) + 1); } data.push(row); } return data; } function createHeatmap(data) { const heatmapContainer = document.getElementById('neon-heatmap'); data.forEach(row => { row.forEach(value => { const cell = document.createElement('div'); cell.className = 'heatmap-cell'; cell.dataset.value = value; cell.innerHTML = value + ' <span class="emoji">✨</span>'; heatmapContainer.appendChild(cell); }); }); } const heatmapData = generateHeatmapData(10, 10); createHeatmap(heatmapData); </script> </body> </html>