A transition animates the gradual change of a CSS property from one value to another when it changes, for example on hover. You specify the properties concerned, the duration, and the easing curve. Avoid transition: all and favor transform and opacity, which are cheap.
Example
button { transition: background-color 150ms ease-out; }
button:hover { background-color: #0b5; }