Bring your designs to life with smooth animations!
Transitions let you smoothly change CSS properties over time, like colors, positions, or sizes.
element {
transition: [property] [duration] [timing-function] [delay];
}
Example:
.box {
transition: all 0.3s ease-in-out;
}
.button {
background: blue;
color: white;
padding: 10px 20px;
transition: background 0.3s;
}
.button:hover {
background: darkblue;
}
.card {
transition: transform 0.3s;
}
.card:hover {
transform: scale(1.05);
}
.image-box {
position: relative;
overflow: hidden;
}
.caption {
position: absolute;
bottom: -50px;
background: rgba(0, 0, 0, 0.7);
color: white;
padding: 10px;
transition: bottom 0.4s ease;
}
.image-box:hover .caption {
bottom: 0;
}
transform
for smoother performance