Select the style changes and unchecked

Html layout
<div class="check">
<input type="checkbox" v-model="agreeCheck" />
I have read and agree
</div>
css styles
.check {
width: 450px;
height: 33px;
line-height: 33px;
font-family: PingFang-SC-Regular;
font-size: 24px;
padding-top: 40px;
padding-left: 40px;
color: #694421;
input {
outline: 0;
-webkit-appearance: none;
position: relative;
width: 24px;
height: 24px;
margin-right: 10px;
transform: translateY(1.5px);
&::after {
content: "";
display: block;
width: 100%;
height: 100%;
background-image: url(../../../../assert/wei.png);
background-size: 100% 100%;
background-repeat: no-repeat;
background-color: transparent;
}
&:checked {
background-image: url(../../../../assert/gou.png);
background-size: 100% 100%;
background-repeat: no-repeat;
background-color: transparent;
}
}
a {
color: #694421;
}
}

Guess you like

Origin www.cnblogs.com/ray123/p/12188765.html