I have a form with some checkboxes for each day of the week, what I want to do is that when the checkbox is clicked, it turns blue in the background and the white letters.
new Vue({
el: "#app",
data: {
},
methods: {
}
})
.label-checkbox {
margin-right: 0.87rem;
margin-left: auto;
border: 1px solid #4273DE;
box-sizing: border-box;
border-radius: 10px;
padding: 5px 10px;
text-align: center;
display: inline-block;
font-family: Roboto;
font-style: normal;
font-weight: normal;
font-size: 14px;
line-height: 16px;
color: #4273DE;
}
.check-day {
visibility: hidden;
position: absolute;
right: 0;
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.js"></script>
<div id="app">
<label class="label-checkbox" for="monday">
<input type="checkbox" class="check-day" id="monday" value="monday" />
Mon
</label>
<label class="label-checkbox" for="tuesday">
<input type="checkbox" class="check-day" id="tuesday" value="tuesday" />
Tues
</label>
<label class="label-checkbox" for="wednesday">
<input type="checkbox" class="check-day" id="wednesday" value="wednesday" />
Wed
</label>
<label class="label-checkbox" for="thursday">
<input type="checkbox" class="check-day" id="thursday" value="thursday" />
Thu
</label>
<label class="label-checkbox" for="friday">
<input type="checkbox" class="check-day" id="friday" value="friday" />
Fri
</label>
<label class="label-checkbox" for="saturday">
<input type="checkbox" class="check-day" id="saturday" value="saturday" />
Sat
</label>
<label class="label-checkbox" for="sunday">
<input type="checkbox" class="check-day" id="sunday" value="sunday" />
Sun
</label>
</div>
When selecting the day, I would like it to look like the following image:
Help me please.
Here is the jsfiddle: https://jsfiddle.net/bardalesj/q7usmayh/1/
