Pressed <button> CSS

Balage74

New Member
I'd like to create button that changes it style when it gets pressed. This is my html code:\[code\]button {font-size: 18px;border: 2px solid gray;border-radius: 100px;width: 100px;height: 100px;}button:active {font-size: 18px;border: 2px solid red;border-radius: 100px;width: 100px;height: 100px;}\[/code\]It is changed only when I hold click on it. I want to make it change style after it's pressed. For example, normal state would be white, state while being clicked would be green and after click is done it would be red.Thank you.
 
Back
Top