<form>
<label>
<input class="checkbox" type="checkbox"/>
同意する
</label>
<button class="button" type="submit">送信</button>
</form>
form button{
text-decoration: line-through;
padding: 8px 20px 8px;
border: #333 solid 1px;
background: #878787;
}
form:has(.checkbox:checked) button{
text-decoration: none;
background: #dbdbdb;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.