1
Hi, I’d like when you hit the button, it would change color and continue like this until another one is pressed.
I tried with the :focus
, but if press another element the color back.
Buttons:
<input type="button" class="button" name="button1" id="button1" value="button1">
<input type="button" class="button" name="button2" id="button2" value="button2">
CSS:
.button
{
background: #76c764;
height: 30px;
width: 49%;
border: none;
border-radius: 5px;
}
.button:focus
{
box-shadow: 0 0 0 0;
border: 0 none;
outline: 0;
background: #69e673;
}