zoukankan      html  css  js  c++  java
  • 灰色纯CSS菜单代码

    代码简介:

    一款灰色的CSS菜单,纯CSS代码实现,兼容IE6/IE7,默认是在IE7下,IE6的CSS代码被注释掉了,如有需要可以去掉注释。两个背景图片运行时可另存为,菜单比较简洁,不喜欢花俏的朋友可以参考一下。

    代码内容:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
    
    transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>灰色纯CSS菜单代码_网页代码站(www.webdm.cn)</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <style>
    .menucontainer{background: #fff url(http://www.webdm.cn/images/20090920/bgOFF1.gif) top left repeat-x;}
    .menu {float:left;font-family: Helvetica,arial,verdana,sans-serif;100%;position:relative;font-
    
    size:11px;font-weight:bold;
    background:url(http://www.webdm.cn/images/20090920/bgOFF1.gif) repeat-x;}
    .menu ul {padding:0;margin:0;list-style-type:none;float:left;position:relative;}
    .menu ul li {float:left;position:relative;display:inline;}
    .menu ul li a, .menu ul li a:visited {float:left;display:block;text-
    
    decoration:none;color:#034895;auto;height:23px;padding:0px 16px 0px 16px;line-height:23px;text-
    
    transform:uppercase;}
    * html .menu ul li a, .menu ul li a:visited {auto;w\idth:auto;}
    /*hide sub nav items*/
    .menu ul li ul {display:none;}
    /*/*/
    table {margin:-1px;border-collapse:collapse;font-size:11px;}
    /*specific to non IE browsers*/
    /*main nav over state*/
    .menu ul li:hover a {color:#000;background: url(http://www.webdm.cn/images/20090920/bgON1.gif) top left repeat
    
    -x;}
    .menu ul li:hover ul {display:block;position:absolute;top:22px;margin-top:1px;left:0;100%;border-top:1px 
    
    solid #fff;}
    .menu ul li:hover ul li a {display:block;background:#E6E6E6;color:#034895;height:auto;line-
    
    height:15px;padding:2px 16px 2px 16px;120px;border-bottom:1px solid #fff;}
    /*sub drop-down over state*/
    .menu ul li:hover ul li a:hover {background:#C9D2DF;color:#000;}
    </style>
    <!--[if lte IE 6]>
    <style>
    .menu ul li a:hover {color:#034895;background:#fff url(http://www.webdm.cn/images/20090920/bgON1.gif) top left 
    
    repeat-x;}
    .menu ul li a:hover ul {display:block;position:absolute;top:22px;left:0;background:#fff;margin-top:0;marg\in-
    
    top:1px;border-top:1px solid #fff;}
    .menu ul li a:hover ul li a {display:block;background:#E6E6E6;color:#034895;height:auto;line-
    
    height:15px;padding:2px 16px 2px 16px;130px;w\idth:120px;border-bottom:1px solid #fff;}
    .menu ul li a:hover ul li a:hover {background:#C9D2DF;color:#034895;}
    </styel>
    <![endif]-->
    </head>
    
    <body>
    <div class="menucontainer">
    <div class="menu">
    <ul>
    <li><a href="/" target="_blank">Home</a></li>
    <li><a href="http://webdm.cn" target="_self">About us</a></li>
    <li><a class="drop" href="#" target="_self">Services<!--[if IE 7]><!-->
    </a>
    <!--<![endif]-->
    <table><tr><td>
    <ul><li><a href="#" target="_self">Design</a></li><li><a href="/" target="_self">Strategy</a></li><li><a 
    
    href="#" target="_self">Analysis</a></li></ul></td></tr></table>
    <!--[if lte IE 6]>
    </a>
    <![endif]-->
    </li>
    <li><a href="/" target="_self">CSS</a></li>
    <li><a href="#" target="_self">Forums</a></li>
    <li><a href="#" target="_self">Contact Us</a></li>
    </ul>
    </div>
    </div>
    <!-- END Menu -->
    </body>
    </html>
    
    <br>
    <p><a href="http://www.webdm.cn">网页代码站</a> - 最专业的代码下载网站 - 致力为中国站长提供有质量的代码!</p>
    

    代码来自:http://www.webdm.cn/webcode/92d11a3b-3f67-478d-a90f-0b52529e1c57.html

  • 相关阅读:
    freeswitch对媒体的处理的三种方式
    Windows如何在cmd命令行中查看、修改、删除与添加、设置环境变量
    freeswitch电话代接
    freeswitch三方通话配置
    认识拨号计划
    洛谷P4049 [JSOI2007]合金 题解
    2020-9杂题选做
    LOJ#6497. 「雅礼集训 2018 Day1」图 题解
    LOJ#6496. 「雅礼集训 2018 Day1」仙人掌 题解
    LOJ#6495. 「雅礼集训 2018 Day1」树 题解
  • 原文地址:https://www.cnblogs.com/webdm/p/1998459.html
Copyright © 2011-2022 走看看