设为首页 加入收藏
当前位置:首页 > 整站内容 > 特效代码 > 导航特效 > 详细内容
梦幻下拉菜单
发布时间:2010-3-19  阅读次数:8220  字体大小: 【】 【】【

<html>
<head>
<title>网页特效|Linkweb.cn/Js|---梦幻下拉菜单</title>
</head><body>
<!--将以下代码加入HTML的<Body></Body>之间-->

<style>
<!--
#iewrap{
position:relative;
height:30px
}

#iewrap2{
position:absolute
}

#dropmenu03{
filter:revealTrans(Duration=1.5,Transition=12)
visibility:hide
}
a:hover {   color: #FF0000}
body {   font-family: "宋体"; font-size: 9pt; text-decoration: none}
a { font-family: "宋体"; font-size: 9pt; text-decoration: none}
-->
</style>
<ilayer id="dropmenu01" height=35px>
<layer id="dropmenu02" visibility=show>
<span id="iewrap">
<span id="iewrap2" onClick="dropit2();event.cancelBubble=true;return false">
<font face="宋体"><a href="#">
导航菜单
</a></font>
</span>
</span>
</layer>
</ilayer>

<script language="JavaScript1.2">
var enableeffect=true

var selection=new Array()
selection[0]='<font face="宋体"><a href="#">网页特效</a></font><br>'
selection[1]='<font face="宋体"><a href="#">学习教程</a></font><br>'
selection[2]='<font face="宋体"><a href="#">平面设计</a></font><br>'
selection[3]='<font face="宋体"><a href="#">资源文章</a></font><br>'
selection[4]='<font face="宋体"><a href="#">源码下载</a></font><br>'

  

  

if (document.layers)
document.dropmenu01.document.dropmenu02.visibility='show'

function dropit2(){
if (document.all){
dropmenu03.style.left=document.body.scrollLeft+event.clientX-event.offsetX
dropmenu03.style.top=document.body.scrollTop+event.clientY-event.offsetY+18
if (dropmenu03.style.visibility=="hidden"){
if (enableeffect)
dropmenu03.filters.revealTrans.apply()
dropmenu03.style.visibility="visible"
if (enableeffect)
dropmenu03.filters.revealTrans.play()
}
else{
hidemenu()
}
}
}

function dropit(e){
if (document.dropmenu03.visibility=="hide")
document.dropmenu03.visibility="show"
else
document.dropmenu03.visibility="hide"
document.dropmenu03.left=e.pageX-e.layerX
document.dropmenu03.top=e.pageY-e.layerY+19
return false
}

function hidemenu(){
if (enableeffect)
dropmenu03.filters.revealTrans.stop()
dropmenu03.style.visibility="hidden"
}

function hidemenu2(){
document.dropmenu03.visibility="hide"
}

if (document.layers){
document.dropmenu01.document.dropmenu02.captureEvents(Event.CLICK)
document.dropmenu01.document.dropmenu02.onclick=dropit
}
else if (document.all)
document.body.onclick=hidemenu

</script>
<div id="dropmenu03" style="position:absolute;left:0;top:0;layer-background-color:seashell;background-color:seashell;width:120;visibility:hidden;border:1px solid black;padding:0px">
<script language="JavaScript1.2">
if (document.all)
dropmenu03.style.padding='4px'
for (i=0;i<selection.length;i++)
document.write(selection[i])
</script>
</div>

<script language="JavaScript1.2">
if (document.layers){
document.dropmenu03.captureEvents(Event.CLICK)
document.dropmenu03.onclick=hidemenu2
}
</script>
</tr></table>
</body></html>

预览效果

天猫商城    聚划算    天猫电器城    淘宝旅行    天猫超市    淘宝游戏    天猫品牌特卖    天猫母婴

我要评论
  • 匿名发表
  • [添加到收藏夹]
  • 发表评论:(匿名发表无需登录,已登录用户可直接发表。) 登录状态:未登录
最新评论
所有评论[0]
    暂无已审核评论!

全站链接: 
收录查询
分享按钮