|
1 <!DOCTYPE html> |
|
2 <html> |
|
3 <head> |
|
4 <style type="text/css"> |
|
5 |
|
6 #c3, #c4 { |
|
7 display: none; |
|
8 } |
|
9 |
|
10 label[for="c1"], |
|
11 label[for="c3"] { |
|
12 background-color: yellow; |
|
13 } |
|
14 |
|
15 </style> |
|
16 |
|
17 </head> |
|
18 |
|
19 <body> |
|
20 |
|
21 <div><input type="checkbox" name="test" id="c1" checked><label for="c1">check #c1</label></div> |
|
22 <div><input type="checkbox" name="test" id="c2"><label for="c2">check #c2</label></div> |
|
23 <div><input type="checkbox" name="test" id="c3" checked><label for="c3">check #c3</label></div> |
|
24 <div><input type="checkbox" name="test" id="c4"><label for="c4">check #c4</label></div> |
|
25 |
|
26 </body> |
|
27 </html> |