CSS 3 · Positioning, effects and animation
Animate a change smoothly
Fade the background when the user hovers.
.button {
transition: background-color 0.2s ease;
}
.button:hover {
background-color: #115e59;
}
More positioning, effects and animation commands
- Stick an element while scrolling
- Cover the parent
- Crop an image to fit its box
- Truncate text with an ellipsis
- Limit text to a number of lines
- Create an animation
All positioning, effects and animation commands · CSS 3 cheatsheet