當僅使用CSS單擊「類別」時,是否可以使以下html切換摺疊/不折疊?類別的CSS摺疊列表
我無法更改Html,但我可以添加CSS。
<div class="prdctfltr_filter prdctfltr_meta prdctfltr_text prdctfltr_single" data-filter="mta_vendor_2_10" data-limit="0">
<input name="mta_vendor_2_10" type="hidden">
<span class="prdctfltr_regular_title">Categories<i class="prdctfltr-down"></i></span>
<div class="prdctfltr_add_scroll" style="max-height:;">
<div class="prdctfltr_checkboxes">
<label class="prdctfltr_ft_none"><input type="checkbox" value=""><span>none</span></label>
<label class="prdctfltr_ft_cat1"><span><input type="checkbox" value="cat1"><span>Category 1</span></span></label>
<label class="prdctfltr_ft_cat2"><span><input type="checkbox" value="cat2"><span>Category 2</span></span></label>
<label class="prdctfltr_ft_cat3"><span><input type="checkbox" value="cat3"><span>Category 3</span></span></label>
</div>
</div>
</div>
包括你的CSS也,更好的做出的jsfiddle –
使用CSS動畫 –