Open this example in the interactive library
Source code
<style>
.demo {
transition: translate 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.demo:hover {
translate: 0.5rem 0;
}
</style>
<button class="demo" type="button">Try this button</button>