### [dedecms怎么做下拉菜单](https://www.prosaas.cn/article/5033) **Published:** 2019-07-31T02:20:39 **Author:** 5201314 **Excerpt:** dedecms做下拉菜单:将下面这段代码贴到templets\default\footer.htm文件里 以上…  **dedecms做下拉菜单:** 将下面这段代码贴到templets\\default\\footer.htm文件里 {dede:channelartlist typeid='top' cacheid='channelsonlist'}
{/dede:channelartlist} 以上代码可以看出,二级子类下拉菜单是由dropdown.js控制的,我们来看dropdown.js文件: 由以上的cssdropdown.startchrome("navMenu"),可以看出我们调用的是 startchrome:function() var cssdropdown={ disappeardelay: 250, disablemenuclick: false, enableswipe: 1, enableiframeshim: 1, dropmenuobj: null, ie: document.all, firefox: document.getElementById&&!document.all, swipetimer: undefined, bottomclip:0, getposOffset:function(what, offsettype){ var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop; var parentEl=what.offsetParent; while (parentEl!=null){ totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop; parentEl=parentEl.offsetParent; } return totaloffset; }, swipeeffect:function(){ if (this.bottomclip