Skip to content
Justice Tech School

Transitions in Depth

transition animates a property change. Set the property, duration, timing function and delay. Transition only properties like transform and opacity for smoothness.

Example
<style>
.b { padding: 10px 16px; background: #0f766e; color: #fff; border: 0; border-radius: 6px; transition: background .3s ease, transform .3s } .b:hover { background: #f59e0b; transform: translateY(-3px) }
</style>
<button class="b">Hover me</button>

Exercise

Animation time.

transition: all  ease;

Quiz Test

Which properties transition smoothly?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.