Open this example in the interactive library
Source code
<style>
.demo {
transition:
color 0.3s,
background-color 0.3s;
}
.demo:hover {
color: white;
background-color: #134e4a;
}
</style>
<button class="demo" type="button">Try this button</button>