⚡
Codepedia
0.0.1
Live Preview Active
</>
HTML
New
Creative Design
Edit the code on the left to see magic happen instantly.
Interact
#
CSS
body { font-family: 'Inter', sans-serif; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; background: linear-gradient(135deg, #1e1e2e, #2d2d44); color: white; } .card { background: rgba(255, 255, 255, 0.05); backdrop-filter: blur(10px); padding: 2.5rem; border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 20px 40px rgba(0,0,0,0.3); text-align: center; max-width: 320px; position: relative; } .badge { position: absolute; top: -10px; right: -10px; background: #ff4757; color: white; padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: bold; box-shadow: 0 5px 15px rgba(255, 71, 87, 0.4); } h2 { margin-top: 0; font-weight: 600; letter-spacing: -0.5px; } p { color: #a0a0b0; line-height: 1.6; margin-bottom: 2rem; } button { background: linear-gradient(90deg, #3742fa, #5352ed); color: white; border: none; padding: 12px 24px; border-radius: 8px; cursor: pointer; font-weight: 500; transition: transform 0.2s, box-shadow 0.2s; } button:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(55, 66, 250, 0.3); }
{}
JS
document.getElementById('btn').addEventListener('click', function() { const btn = this; btn.innerText = 'Clicked!'; btn.style.background = '#2ed573'; const card = document.querySelector('.card'); card.style.transition = 'transform 0.1s'; card.style.transform = 'translateX(10px)'; setTimeout(() => { card.style.transform = 'translateX(-10px)'; }, 100); setTimeout(() => { card.style.transform = 'translateX(0)'; btn.innerText = 'Interact'; btn.style.background = ''; }, 400); });
localhost:3000