在Blueidea看到的一段完全使用CSS制作的下拉菜单,绝对的强~因此收藏了一下。
这个样式最大的收获就是CSS也可以像JS一样,使用例如:div.open,a.outer:hover之类实现类似于MoveOut的效果,看完这段CSS样式代码,受益非浅啊~~
window.attachEvent("onload",function (){AutoSizeDIV('CODE_6509')})
<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"[<!ELEMENTa(#PCDATA|table)*>]>
<htmlxmlns="http://www.w3.org/1999/xhtml"xml:lang="en">
<head>
<metahttp-equiv="Content-Type"content="application/xhtml+xml;charset=UTF-8"/>
<title>纯CSS下拉菜单,兼容IE和FF</title>
<styletype="text/css">
body{color:#fff;}
#wrapper{color:#000;}
.red{color:#c00;}
#info{margin-top:20px;}
#infoh1{font-size:3em;text-align:center;font-family:georgia,"timesnewroman",serif;}
#head{height:145px;border:0;}
#positioner{clear:both;position:relative;left:1px;z-index:100;}
#ads{position:relative;z-index:10;}
.menu{display:none;}
#noniemenu{position:absolute;}
#noniemenu.holderul{padding:0;margin:0;}
#noniemenu.holderulli{list-style-type:none;}
#noniemenu.holderli{}
#noniemenu.holderliul{display:none;}
#noniemenu.holderli:hover>ul#a3{display:block;position:absolute;left:105px;margin-top:-20px;border:1pxsolid#000;}
#noniemenu.holder.bold{font-weight:bold;}
#noniemenu.holder{
color:#fff;
width:104px;
height:18px;
display:block;
overflow:hidden;
float:left;
border:1pxsolid#000;
margin-right:1px;
font-size:10px;
}
#noniemenu.holder:hover{
height:auto;
}
#noniemenua.outer,#noniemenua.outer:visited{
color:#fff;
width:104px;
line-height:18px;
display:block;
background:#e09222;
text-align:center;
text-decoration:none;
font-family:verdana,arial,sans-serif;
}
#noniemenua.outer:hover{
background:#697210;
overflow:visible;
}
#noniemenudiv.open{display:none;}
#noniemenua.inner,#noniemenua.inner:visited{
display:block;
width:104px;
height:18px;
line-height:18px;
border-bottom:1pxsolid#000;
text-decoration:none;
color:#000;
background:#eee;
text-align:center;
}
#noniemenua.second{font-weight:bold;}
#noniemenua.inner:hover{
background:#add;
}
</style>
<!--[iflteIE6]>
<styletype="text/css">
body{margin-top:-8px;}
#head{height:147px;}
#noniemenu{display:none;}
.menu{display:block;position:absolute;}
.menua.outer,.menua.outer:visited{
color:#fff;
width:104px;
height:18px;
display:block;
background:#e09222;
border:1pxsolid#000;
margin-right:1px;
text-align:center;
float:left;
text-decoration:none;
font-family:verdana,arial,sans-serif;
font-size:10px;
line-height:18px;
overflow:hidden;
}
.menua.outer:hover{
background:#697210;
overflow:visible;
}
.menua.outer:hovertable.first{
display:block;
background:#eee;
border-collapse:collapse;
}
.menua.inner,.menua.inner:visited{
display:block;
width:102px;
height:18px;
border-bottom:1pxsolid#000;
text-decoration:none;
color:#000;
font-family:verdana,arial,sans-serif;
font-size:10px;
text-align:center;
}
.menua.inner:hover{
background:#add;
}
.menua.outertable.firsta.second{
height:18px;
line-height:18px;
overflow:hidden;
font-weight:bold;
}
.menua.outertable.firsta.second:hover{
position:relative;
overflow:visible;
}
.menua.outertable.firsta.second:hovertable{
position:absolute;
top:-2px;
left:102px;
border-collapse:collapse;
background:#eee;
border:1pxsolid#000;
font-weight:normal
}
</style>
<![endif]-->
<!--[iflteIE6]>
<style>
#ads{display:none;}
#adsie{clear:both;text-align:center;width:750px;margin-top:10px;}
</style>
<![endif]-->
</head>
<body>
<divid="wrapper">
<divid="head">
<divid="positioner">
<divclass="menu">
<aclass="outer"href="../menu/index.html">DEMOS
<tableclass="first"><tr><td>
<aclass="inner"href="../menu/zero_dollars.html"title="Thezerodollaradspage">zerodollars</a>
<aclass="inner"href="../menu/embed.html"title="Wrappingtextaroundimages">wrappingtext</a>
<aclass="inner"href="../menu/form.html"title="Stylingforms">styledform</a>
<aclass="inner"href="../menu/nodots.html"title="Removingactive/focusborders">activefocus</a>
<aclass="innersecond"href="../menu/hover_click.html"title="Hover/clickwithnoactive/focusborders">HOVER/CLICK>
<table><tr><td>
<aclass="inner"href="../menu/form.html"title="Stylingforms">styledform</a>
<aclass="inner"href="../menu/nodots.html"title="Removingactive/focusborders">activefocus</a>
<aclass="inner"href="../menu/hover_click.html"title="Hover/clickwithnoactive/focusborders">hover/click</a>
</td></tr></table>
</a>
<aclass="inner"href="../menu/shadow_boxing.html"title="Multi-positiondropshadow">shadowboxing</a>
<aclass="inner"href="../menu/old_master.html"title="ImageMapfordetailedinformation">imagemap</a>
<aclass="inner"href="../menu/bodies.html"title="funwithbackgroundimages">funbackgrounds</a>
<aclass="inner"href="../menu/fade_scroll.html"title="fade-outscrolling">fadescrolling</a>
<aclass="inner"href="../menu/em_images.html"title="emsizeimagescompared">emsizedimages</a>
</td></tr></table>
</a>
<aclass="outer"href="index.html">MENUS
<tableclass="first"><tr><td>
<aclass="inner"href="spies.html"title="acodedlistofspies">spiesmenu</a>
<aclass="inner"href="vertical.html"title="ahorizontalverticalmenu">verticalmenu</a>
<aclass="inner"href="expand.html"title="anenlargingunorderedlist">enlarginglist</a>
<aclass="inner"href="enlarge.html"title="anunorderedlistwithlinkimages">linkimages</a>
<aclass="inner"href="cross.html"title="non-rectangularlinks">non-rectangular</a>
<aclass="inner"href="jigsaw.html"title="jigsawlinks">jigsawlinks</a>
<aclass="inner"href="circles.html"title="circularlinks">circularlinks</a>
</td></tr></table>
</a>
<aclass="outer"href="../layouts/index.html">LAYOUTS
<tableclass="first"><tr><td>
<aclass="inner"href="../layouts/bodyfix.html"title="Crossbrowserfixedlayout">Fixed1</a>
<aclass="inner"href="../layouts/body2.html"title="Crossbrowserfixedlayout">Fixed2</a>
<aclass="inner"href="../layouts/body4.html"title="Crossbrowserfixedlayout">Fixed3</a>
<aclass="inner"href="../layouts/body5.html"title="Crossbrowserfixedlayout">Fixed4</a>
<aclass="inner"href="../layouts/minimum.html"title="Asimpleminimumwidthlayout">minimumwidth</a>
</td></tr></table>
</a>
<aclass="outer"href="../boxes/index.html">BOXES
<tableclass="first"><tr><td>
<aclass="inner"href="../boxes/scrollbars.html"title="Leftscrollbars">leftscroll</a>
<aclass="inner"href="../boxes/floatfix.html"title="IE63pxfloatfix">IE63pxfix</a>
<aclass="inner"href="../boxes/snazzy.html"title="Snazzyborders">snazzyborders</a>
<aclass="inner"href="../boxes/krazy.html"title="KrazyKorners">krazykorners</a>
<aclass="inner"href="../boxes/outside.html"title="PercentagePLUSpixels">%PLUSpixels</a>
<aclass="inner"href="../boxes/minwidth.html"title="min-widthforIE">IEmin-width</a>
<aclass="inner"href="../boxes/minheight.html"title="min-heightforIE">IEmin-height</a>
</td></tr></table>
</a>
<aclass="outer"href="../mozilla/index.html">MOZILLA
<tableclass="first"><tr><td>
<aclass="inner"href="../mozilla/dropdown.html"title="Adropdownmenu">dropdownmenu</a>
<aclass="inner"href="../mozilla/cascade.html"title="Acascadingmenu">cascadingmenu</a>
<aclass="inner"href="../mozilla/content.html"title="Usingcontent:">content:</a>
<aclass="inner"href="../mozilla/moxbox.html"title=":hoverappliedtoadiv">mozziebox</a>
<aclass="inner"href="../mozilla/rainbow.html"title="Icanbuildarainbow">rainbowbox</a>
<aclass="inner"href="../mozilla/snooker.html"title="Snookercue">snookercue</a>
<aclass="inner"href="../mozilla/target.html"title="TargetPractise">targetpractise</a>
<aclass="inner"href="../mozilla/splittext.html"title="Twotoneheadings">twotoneheadings</a>
<aclass="inner"href="../mozilla/shadow_text.html"title="Shadowtext">shadowtext</a>
</td></tr></table>
</a>
<aclass="outer"href="../ie/index.html">EXPLORER
<tableclass="first"><tr><td>
<aclass="inner"href="../ie/exampleone.html"title="Exampleone">exampleone</a>
<aclass="inner"href="../ie/weft.html"title="Weftfonts">weftfonts</a>
<aclass="inner"href="../ie/exampletwo.html"title="Verticalalign">verticalalign</a>
</td></tr></table>
</a>
<aclass="outer"href="../opacty/index.html">OPACITY
<tableclass="first"><tr><td>
<aclass="inner"href="../opacty/colours.html"title="colourwheel">opaquecolours</a>
<aclass="inner"href="../opacty/picturemenu.html"title="amenuusingopacity">opaquemenu</a>
<aclass="inner"href="../opacty/png.html"title="partialopacity">partialopacity</a>
<aclass="inner"href="../opacty/png2.html"title="partialopacityII">partialopacityII</a>
</td></tr></table>
</a>
</div>
分享到:
相关推荐
CSS3制作下拉菜单,供大家一起共同分享学习。
这是一款纯CSS大型下拉菜单。该大型菜单使用HTML和纯CSS代码制作,没有任何js代码。适合用于栏目分类较多的网站使用。
24、Jquery纯CSS3制作华丽网站下拉菜单
div+css制作一个纯css下拉菜单导航 div+css制作一个纯css下拉菜单导航 div+css制作一个纯css下拉菜单导航 div+css制作一个纯css下拉菜单导航
纯CSS下拉导航菜单 纯CSS下拉导航菜单
主要介绍了纯html+css制作三级下拉菜单,如何制作下拉菜单效果,三级下拉菜单又是怎么实现的,本文为大家揭晓,感兴趣的小伙伴们可以参考一下
然而大家知道,使用 CSS 的 :hover 伪类也可以制作下拉菜单,比起javascript来,使用CSS制作更简单,且更容易理解。但由于 IE6 只有 a 标签支持 :hover 伪类,所以又给这种带来了“阻碍”。不过大家还是比较喜欢纯...
css3个性化下拉菜单、css3个性化下拉菜单、css3个性化下拉菜单、css3个性化下拉菜单
DIV+CSS制作的CSS的下拉菜单,用着方便,简单易用
网页制作前端用纯CSS制作二级导航,用最简单的CSS样式实现二级导航下拉列表,html和css样式简洁清晰,一看就会,拿来就能直接用。
这是一款使用html5 svg和css3制作的炫酷select下拉菜单美化效果。这个select下拉菜单美化效果有滑动、淡入淡出、网格、环形菜单等8种不同效果,用到了html5,css3和js等技术。
CSS+JS下拉菜单制作软件CSS+JS下拉菜单制作软件CSS+JS下拉菜单制作软件CSS+JS下拉菜单制作软件
这是一款使用纯CSS3制作的带下划线跟随效果的下拉菜单特效。该下拉菜单通过CSS3 transform和transition来制作下划线跟随效果和下拉菜单效果。
一款纯css制作的下拉菜单,没有js,ie6、ie7、ie8 火狐等浏览都兼容的,超级实用
使用DIV+CSS技术实现导航栏菜单的制作,鼠标经过每个菜单标题,它的子菜单就会出现。
下载就可以使用的css制作的简易的下拉导航栏菜单
纯css实现水平下拉导航菜单是一款css导航菜单制作下拉三级菜单代码下载。
20个最炫HTML5,jQuery和CSS3下拉菜单制作教程
div+css样式制作的下拉菜单 ,相当实用 div+css样式制作的下拉菜单 ,相当实用
一级下拉列表,二级下拉列表,三级下拉列表。。。网上搜集的资料,并且对不同IE版本有区分,效果还不错哦!