freecoding.school100% FREE · NO SIGNUP
Neon DistrictISSUE #3 of 50

transitions · property · duration · timing · delay

PrismaVSJank the Janitor
Prisma saystransition animates a property smoothly between two values over a duration.

transition: background .3s ease animates background changes over 0.3s. List property, duration, timing function, and optional delay. Transitions fire on state changes. Animate cheap properties (transform, opacity) for smooth 60fps; avoid animating layout properties.

Power-ups you unlock

Jank the Janitor attacks — common mistakes

Boss battleAdd a smooth color + transform transition to a button on hover.

Example code

<!doctype html><html><head><meta charset="utf-8">
<style>button{font:inherit;padding:10px 18px;background:#140a28;color:#b388ff;border:1px solid #b388ff;border-radius:4px;transition:transform .2s,background .2s}button:hover{transform:translateY(-2px);background:#1c1240}</style></head><body style="background:#06040d;padding:30px"><button>hover me</button></body></html>
▶ Open the interactive comic issue
‹ 3d Transforms · Perspective · Rotate3dTiming Functions · Ease · Cubic-Bezier · Steps ›