网络编程 | 站长之家 | 网页制作 | 图形图象 | 操作系统 | 冲浪宝典 | 软件教学 | 网络办公 | 邮件系统 | 网络安全 | 认证考试 | 系统进程
Firefox | IE | Maxthon | 迅雷 | 电驴 | BitComet | FlashGet | QQ | QQ空间 | Vista | 输入法 | Ghost | Word | Excel | wps | Powerpoint
asp | .net | php | jsp | Sql | c# | Ajax | xml | Dreamweaver | FrontPages | Javascript | css | photoshop | fireworks | Flash | Cad | Discuz!
当前位置 > 网站建设学院 > 网页制作 > 网页特效
网页制作:Dreamweaver教程,FrontPages教程,Javascript教程,HTML教程,CSS教程,心得技巧,DHTML教程,网页特效,Discuz!论坛
本月文章推荐
.用图片取代文字按钮,使你的网页.
.很好的文字公告栏特效代码.
.图片响应鼠标的变换.
.带复选框的列表框[网页特效代码].
.又一页面转向的进度条代码.
.进入页面时弹出收藏夹窗口,一旦.
.自动后台弹出页面.
.不间断连续滚动的图片效果(向左滚.
.全页漂浮的图片的广告代码[网页特.
.向上收缩并隐藏的Fash广告代码.
.控制选择框选择的项目的脚本.
.特殊标签fieldset实现的表中表效.
.CSS+DIV实现的滑动门菜单特效代码.
.状态栏显示链接内容特效.
.文字闪烁的特效代码.
.图片幻灯片切换(加上了鼠标的特效.
.禁止别人用frame引用你的页面.
.DIV CSS制作的符合标准的网页导航.
.顶部自动消失的图片特效[网页特效.
.Flash+JS打造的新浪新闻频道关于.

css设置的下拉菜单

发表日期:2007-12-19


<!-- 把下列代码加入到head区内 -->
<style type="text/css">

#cssdropdown, #cssdropdown ul {
padding: 0;
margin: 0;
list-style: none;
}

#cssdropdown li {
float: left;
position: relative;
}

.mainitems{
border: 1px solid black;
background-color: #FFEEC6;
}

.mainitems a{
margin-left: 6px;
margin-right: 8px;
text-decoration: none;
}

.subuls{
display: none;
width: 10em;
position: absolute;
top: 1.2em;
left: 0;
background-color: lightyellow;
border: 1px solid black;
}

.subuls li{
width: 100%;
}

.subuls li a{
text-decoration: underline;
}

#cssdropdown li>ul { /* to override top and left in browsers other than IE, which will position to the top right of the containing li, rather than bottom left */
top: auto;
left: auto;
}

#cssdropdown li:hover ul, li.over ul { /* lists nested under hovered list items */
display: block;
}

#restofcontent { /*wrap rest of content of the page inside this div*/
clear: left;
}

</style>

<script type="text/javascript"><!--//--><![CDATA[//><!--
startList = function() {
if (document.all&&document.getElementById) {
cssdropdownRoot = document.getElementById("cssdropdown");
for (i=0; i<cssdropdownRoot.childNodes.length; i++) {
node = cssdropdownRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
}
node.onmouseout=function() {
this.className=this.className.replace(" over", "");
}
}
}
}
}

if (window.attachEvent)
window.attachEvent("onload", startList)
else
window.onload=startList;

//--><!]]></script>


<!-- 把下列代码加入到body区内 -->
<ul id="cssdropdown">

<li class="mainitems">
<a href="CSS">/article.asp?typeid=38">CSS Gallery</a>
<ul class="subuls">
<li><a href="">Gordon Mac</a></li>
<li><a href="">Juiced Thoughts</a></li>
<li><a href="">The Daily Flight</a></li>
<li><a href="">GrapeFruit</a></li>
</ul>
</li>

<li class="mainitems">
<a href="CSS">/article.asp?typeid=38">CSS Examples</a>
<ul class="subuls" style="width: 15em">
<li><a href="">CSS2 Generated Content</a></li>
<li><a href="">Custom scrollbar colors</a></li>
<li><a href="">Markerless and "no indent" Lists</a></li>
</ul>
</li>

</ul>

上一篇:CSS制作的导航菜单代码 人气:1347
下一篇:兰色背景变换的CSS导航菜单 人气:1099
浏览全部css的内容 Dreamweaver插件下载 网页广告代码 祝你圣诞节快乐 2009年新年快乐