I am facing an issue with three buttons that act as choices on a page. When a user selects one of them, the background color changes using :focus in CSS. However, when the user clicks on a submit button to run a function without reloading the page, the focus is removed from the chosen button and the background color reverts back. How can I ensure that the button stays focused even after clicking on the submit button?
<button class="btn btn-lg text-white mark-answers"
v-for="(item, index) in markAnswers" :key="index" v-on:click="answerMarked">
<span style="color: #000;"> {{ item.answer }} </span>
.mark-answers {
font-size: 23px !important;
font-weight: bold;
display:list-item !important;
background-color: #fb3;
width: 500px;
}
.mark-answers:hover {
background-color: #ffd98a;
}
.mark-answers:focus {
background-color:#f7f2ff;
}