I would like to change the style of the text inside the
<input type="checkbox" /> Origano
to make "Origano" with style text-decoration:line-through
after an user checked the box
One way in recent browsers;
.selection_checkbox:checked + .selection_label {
text-decoration:line-through;
}
<input id="oregano" type="checkbox" class="selection_checkbox" />
<label for="oregano" class="selection_label">Oregano</label>
您可以将其添加到您的css文件
input[type="checkbox"][checked]{text-decoration:line-through}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.