I have the following buttons. buttons.
This post helped me out. However, every time I click on anything else, the color change of my button disappears. How can I keep the button colored orange, until I click on a different one?
Here is my css:
.circle-button{
border-radius: 50%;
width: 20px;
height: 20px;
display: inline-block;
background: var(--button-background, rgb(110, 109, 105));
margin-left: 2px;
margin-right: 2px;
margin-top: 5px;
margin-bottom: 5px
}
.circle-button:focus{
outline: none;
--button-background: rgb(231, 153, 8);
}
.circle-button:visited{
--button-background: rgb(153, 13, 130);
}
here is my html:
<div class="circle-button" *ngFor="let record of imageRecords; let i = index" tabindex="{{i}}" ></div>