Basic Rectangle - Darken on Hover

The button gets darker when you hover over it. No secondary hover color needs to be specified, it will just work.

HTML:

Copy to clipboard
<a href='#'><div id='button-example-942'>Click here!</div></a>

CSS:

Copy to clipboard

#button-example-942 {

color: #fffff7; background-color: #D0A7A2; padding: 20px 40px; font-size: 18px; font-weight: 600; width: 200px; text-align: center;

}

#button-example-942:hover {

background-image: linear-gradient(rgb(0 0 0/20%) 0 0);

}

Pumpkins n' Pies

A recipe blog devoted to gluten free baking, and making food from scratch. Here you will find sourdough recipes, beautiful flowers, organic fruits, and most importantly - lots of pie!
 © 2024 Abhishek & Miriam Chaturvedi