How can I change the background color of a div tag permanently once it is clicked. Tried the following code :
div {
min-height: 50px;
background-color: yellow;
border-radius: 4px 4px 0 0;
padding: 10px;
display: flex;
align-items: center;
&:active {
background-color: red;
}
}
But with this the background color is restored to previous one after the click is released. Is there a way to do this with SCSS and html alone?
<div class="div">
<p>Hello</p>
</div>