Zest.

CSS: Hover transition

A short, tested CSS example for hover transition. Copy it and adjust the names and paths for your project.

CSS
.button {
  background: #333;
  transition: background 150ms ease, transform 150ms ease;
}
.button:hover { background: #555; transform: translateY(-1px); }

Find it in Zest

Search for “css hover transition” in Zest and this example appears above the results, with other matches to choose from. Searches stay private.

More CSS examples

All CSS examples