HTML CSS examples for CSS Selector:attribute equals value
Style with check box is checked with input[type=checkbox]:checked
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> input[type=checkbox]:checked + label.strikethrough { text-decoration:line-through;<!--from ww w .j a v a 2 s .c om--> } </style> </head> <body> <div class="form-group "> <label for="inputName" class="col-md-1 control-label">select</label> <div class="col-md-5"> <div class="checkbox"> <input type="checkbox" name="packersOff" value="1"> <label class="strikethrough">test</label> </div> </div> </div> </body> </html>