资料
表格
制度
合同
管理
职场
经营
创业
范文
总结
计划
作文
文章
美文
词句
教程
模板
图片
字体
图标
办公
人事
财务
生产
管理资源吧首页
>>>
教程
>>>
编程
>>>
JavaScript教程
>>>
Div+Js实现的带阴影菜单 微软以前网站曾用过
<title>Div+Js实现的带阴影菜单 微软以前网站曾用过</title> <img src="/_New/_cj/myeditor/sysimage/space.gif" class="ewebeditor__script" _ewebeditor_fake_tag="script" _ewebeditor_fake_value="%3Cscript%3E%20%0D%0Avar%20global%20%3D%20window.document%20%0D%0Aglobal.fo_shadows%20%3D%20new%20Array%20%0D%0Afunction%20makeRectangularDropShadow(el%2C%20color%2C%20size)%20%0D%0A%7B%20%0D%0A%20%20%20%20var%20i%3B%20%0D%0A%20%20%20%20for%20(i%3Dsize%3B%20i%3E0%3B%20i--)%20%0D%0A%20%20%20%20%7B%20%0D%0A%0D%0A%20%20%20%20%20%20%20%20var%20rect%20%3D%20document.createElement('div')%3B%20%0D%0A%20%20%20%20%20%20%20%20var%20rs%20%3D%20rect.style%20%0D%0A%20%20%20%20%20%20%20%20rs.position%20%3D%20'absolute'%3B%20%0D%0A%20%20%20%20%20%20%20%20rs.left%20%3D%20(el.style.posLeft%20%2B%20i)%20%2B%20'px'%3B%20%0D%0A%20%20%20%20%20%20%20%20rs.top%20%3D%20(el.style.posTop%20%2B%20i)%20%2B%20'px'%3B%20%0D%0A%20%20%20%20%20%20%20%20rs.width%20%3D%20el.offsetWidth%20%2B%20'px'%3B%20%0D%0A%20%20%20%20%20%20%20%20rs.height%20%3D%20el.offsetHeight%20%2B%20'px'%3B%20%0D%0A%20%20%20%20%20%20%20%20rs.zIndex%20%3D%20el.style.zIndex%20-%20i%3B%20%0D%0A%20%20%20%20%20%20%20%20rs.backgroundColor%20%3D%20color%3B%20%0D%0A%20%20%20%20%20%20%20%20var%20opacity%20%3D%201%20-%20i%20%2F%20(i%20%2B%201)%3B%20%0D%0A%20%20%20%20%20%20%20%20rs.filter%20%3D%20'alpha(opacity%3D'%20%2B%20(100%20*%20opacity)%20%2B%20')'%3B%20%0D%0A%20%20%20%20%20%20%20%20el.insertAdjacentElement('afterEnd'%2C%20rect)%3B%20%0D%0A%20%20%20%20%20%20%20%20global.fo_shadows%5Bglobal.fo_shadows.length%5D%20%3D%20rect%3B%20%0D%0A%20%20%20%20%7D%20%0D%0A%0D%0A%7D%20%0D%0A%3C%2Fscript%3E"> <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> <img src="/_New/_cj/myeditor/sysimage/space.gif" class="ewebeditor__script" _ewebeditor_fake_tag="script" _ewebeditor_fake_value="%3Cscript%3E%20%0D%0AmakeRectangularDropShadow(document.all%5B%22menu%22%5D%2C%20%22%23666666%22%2C%204)%3B%20%0D%0A%3C%2Fscript%3E">
[Ctrl+A 全选 注:
如需引入外部Js需刷新才能执行
]
教程首页
更多教程