<div class="htmlarea"><textarea id="runcode29383"> <title>Div+Js实现的带阴影菜单 微软以前网站曾用过</title> <script> var global = window.document global.fo_shadows = new Array function makeRectangularDropShadow(el, color, size) { var i; for (i=size; i>0; i--) { var rect = document.createElement('div'); var rs = rect.style rs.position = 'absolute'; rs.left = (el.style.posLeft + i) + 'px'; rs.top = (el.style.posTop + i) + 'px'; rs.width = el.offsetWidth + 'px'; rs.height = el.offsetHeight + 'px'; rs.zIndex = el.style.zIndex - i; rs.backgroundColor = color; var opacity = 1 - i / (i + 1); rs.filter = 'alpha(opacity=' + (100 * opacity) + ')'; el.insertAdjacentElement('afterEnd', rect); global.fo_shadows[global.fo_shadows.length] = rect; } } </script> <style>body,td,div,a,input{font:menu;line-height:180%}</style> <div id="menu" style="position:absolute; left: 10px; top: 10px; background: #EEEEEE; width: 120px; height: 100px; padding: 3px; border: 1 #999999 solid; cursor: default"> <div style="border: 1 solid #EEE" onmouseover="this.style.background='#CCC'; this.style.borderColor='#999'" onmouseout="this.style.background='#EEE'; this.style.borderColor='#EEE'">Jb51.net</div> <div style="border: 1 solid #EEE" onmouseover="this.style.background='#CCC'; this.style.borderColor='#999'" onmouseout="this.style.background='#EEE'; this.style.borderColor='#EEE'">脚本之家</div> <div style="border: 1 solid #EEE" onmouseover="this.style.background='#CCC'; this.style.borderColor='#999'" onmouseout="this.style.background='#EEE'; this.style.borderColor='#EEE'">网页特效</div> <script> makeRectangularDropShadow(document.all["menu"], "#666666", 4); </script> <br><input onclick="runEx('runcode29383')" type="button" value="运行代码"> <input onclick="doCopy('runcode29383')" type="button" value="复制代码"> <input onclick="doSave(runcode29383)" type="button" value="保存代码">[Ctrl+A 全选 注:<a href="http://www.jb51.net/article/23421.htm" title="查看具体详情" target="_blank">如需引入外部Js需刷新才能执行</a>]</div> </textarea></div>