0

.button {
  font-size: 18px;
  font-family: Bradley Hand;
  color: purple;
  background: rgb(0, 255, 0);   /*Default settings for button*/
  border: 5px;
  width: 100px;
  height: 50px;
  transition-duration: 0.5s;
  border-radius: 10%;
}
.button:hover {
  background: rgb(0, 255, 125); /*Changes the buttons size, color,*/
  width: 120px;                 /*and font size*/
  height: 60px;
  font-size: 22px;
}
<button class = "button">Click me!</button>

I want it to look like you are actually pressing a button. Someone help!

EgMusic
  • 136
  • 17

2 Answers2

1

Try and look at this side on w3schools, they got some pretty good code on button animations. https://www.w3schools.com/howto/howto_css_animate_buttons.asp

Seb
  • 525
  • 1
  • 5
  • 25
0

https://developer.mozilla.org/en-US/docs/Web/CSS/%3Aactive

.button:active { /* your code here */}

I suggest you make it darker when clicked, maybe add a gradient inside so it looks recessed.

Style button when :active different from :hover

Digits
  • 2,634
  • 2
  • 14
  • 23