<div> <input type="checkbox" name="q[]" id="q1" /><label for="q1">小宝3225</label> <input type="checkbox" name="q[]" id="q2" /><label for="q2">王老白白白</label> <input type="checkbox" name="q[]" id="q3" /><label for="q3">空夫31</label> <input type="checkbox" name="q[]" id="q4" /><label for="q4">谷大白话</label> <input type="checkbox" name="q[]" id="q5" /><label for="q5">Meathill</label> <input type="checkbox" name="q[]" id="q6" /><label for="q6">一毛不拔大师</label> <hr /> </div>
div { display:flex; flex-direction:row; flex-wrap:wrap; font: 14px/25px Arial; } div:first-line { color:#F30; } input[type=checkbox], label { order:2; } label { min-width:100px; margin-right:5px; } hr { width: 100%; order: 1; display:none; } input[type=checkbox]:checked { order:0; } input[type=checkbox]:checked + label { order:0; } input[type=checkbox]:checked ~ hr { display:block; }