Is there a way to permanently change the background color of a div tag after it has been clicked? I tried the code below:
div {
min-height: 50px;
background-color: yellow;
border-radius: 4px 4px 0 0;
padding: 10px;
display: flex;
align-items: center;
&:active {
background-color: red;
}
}
However, the background color reverts to the original one once the click is released. Is there a solution using only SCSS and html?
<div class="div">
<p>Hello</p>
</div>