html+css3+jquery垂直渐隐显示多级下拉特效
1、新建html文档。

3、初始化css代码。<style>html, body, div, span, applet, object, ifra罪焐芡拂me, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline; }article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, main { display: block; }body { line-height: 1; }ol, ul { list-style: none; }blockquote, q { quotes: none; }blockquote:before, blockquote:after, q:before, q:after { content: ''; content: none; }table { border-collapse: collapse; border-spacing: 0; }</style>

5、书写并添加js代码。<script src="js/modernizr.js"></script><script src="js/jquery-2.1.1.min.js"></script><script>jQuery(document).ready(function(){ var accordionsMenu = $('.cd-accordion-menu'); if( accordionsMenu.length > 0 ) { accordionsMenu.each(function(){ var accordion = $(this); accordion.on('change', 'input[type="checkbox"]', function(){ var checkbox = $(this); console.log(checkbox.prop('checked')); ( checkbox.prop('checked') ) ? checkbox.siblings('ul').attr('style', 'display:none;').slideDown(300) : checkbox.siblings('ul').attr('style', 'display:block;').slideUp(300); }); }); }});</script>

7、查看效果。
