CSS3现代头部导航特效代码

版权:原创 更新时间:1年以上
[该文章底部包含文件资源,可根据自己情况,决定是否下载资源使用,时间>金钱,如有需要,立即查看资源]

以下是 CSS3现代头部导航特效代码 的示例演示效果:

当前平台(PC电脑)
  • 平台:

部分效果截图:

CSS3现代头部导航特效代码

HTML代码(index.html):

<!DOCTYPE html>
<html lang="en" >
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <meta name="author" content="Script Tutorials" />
        <title>CSS3现代头部导航</title>
        <!-- add styles -->
        <link href="css/main.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
        <div id="header">
            <!-- logo -->
            <a href="#" id="logo"><img src="images/logo.png"></a>

            <!-- extra top links -->
            <div id="links">
                <a href="#">About us</a>
                <a href="#">Help</a>
                <a href="#">Contact Us</a>
            </div>

            <!-- navigation menu -->
            <div id="navmenu">
                <nav id="menu">
                    <ul>
                        <li class="active"><a href="index.php">Home</a>
                            <ul>
                                <li><a href="#"><span class="icon elem1"></span>
								Facebook</a></li>
                                <li><a href="#"><span class="icon elem2"></span>
								Google</a></li>
                                <li><a href="#"><span class="icon elem3"></span>
								RSS</a></li>
                                <li><a href="#"><span class="icon elem4"></span>
								Skype</a></li>
                                <li><a href="#"><span class="icon elem5"></span>
								Stumbleupon</a></li>
                            </ul>
                        </li>
                        <li><a href="#">Faces</a>
                            <ul>
                                <li><a href="#"><span class="icon elem0"></span>
								menu element 1</a></li>
                                <li><a href="#"><span class="icon elem0"></span>
								menu element 2</a></li>
                                <li><a href="#"><span class="icon elem0"></span>
								menu element 3</a></li>
                                <li><a href="#"><span class="icon elem0"></span>
								menu element 4</a></li>
                                <li><a href="#"><span class="icon elem0"></span>
								menu element 5</a></li>
                            </ul>
                        </li>
                        <li><a href="#">Clubs</a>
                            <ul>
                                <li><a href="#"><span class="icon elem0"></span>
								menu element 1</a></li>
                                <li><a href="#"><span class="icon elem0"></span>
								menu element 2</a></li>
                                <li><a href="#"><span class="icon elem0"></span>
								menu element 3</a></li>
                                <li><a href="#"><span class="icon elem0"></span>
								menu element 4</a></li>
                                <li><a href="#"><span class="icon elem0"></span>
								menu element 5</a></li>
                            </ul>
                        </li>
                        <li><a href="#">Photos</a>
                            <ul>
                                <li><a href="#"><span class="icon elem0"></span>
								menu element 1</a></li>
                                <li><a href="#"><span class="icon elem0"></span>
								menu element 2</a></li>
                                <li><a href="#"><span class="icon elem0"></span>
								menu element 3</a></li>
                                <li><a href="#"><span class="icon elem0"></span>
								menu element 4</a></li>
                                <li><a href="#"><span class="icon elem0"></span>
								menu element 5</a></li>
                            </ul>
                        </li>
                        <li><a href="#">Videos</a></li>
                        <li><a href="#">Games</a></li>
                        <li><a href="#">Blog</a>
                            <ul>
                                <li><a href="#"><span class="icon elem0"></span>
								menu element 1</a></li>
                                <li><a href="#"><span class="icon elem0"></span>
								menu element 2</a></li>
                                <li><a href="#"><span class="icon elem0"></span>
								menu element 3</a></li>
                                <li><a href="#"><span class="icon elem0"></span>
								menu element 4</a></li>
                                <li><a href="#"><span class="icon elem0"></span>
								menu element 5</a></li>
                            </ul>
                        </li>
                        <li><a href="#">Classifieds</a></li>
                    </ul>
                </nav>

                <!-- search form -->
                <div id="search">
                    <form role="search" method="get">
                        <input type="text" placeholder="search..." name="s" value="" autocomplete="off" />
                    </form>
                </div>
            </div>
        </div>
    </body>
</html>







CSS代码(main.css):

*{margin:0;padding:0;}
html{background-attachment:fixed;background-color:#ffffff;height:100%;}
footer{background-color:rgba(33,33,33,0.9);bottom:0;color:#FFFFFF;display:block;font:14px/1.3 Arial,sans-serif;height:50px;position:fixed;width:100%;}
footer h2{font-size:22px;margin:0px auto;padding:10px 0;width:80%;text-align:center;}
footer a,a:visited{text-decoration:none;color:#fcfcfc;}
/* header styles */
#header{border:1px solid;border-color:rgba(0,0,0,0.1);border-bottom-color:rgba(0,0,0,0.2);border-top:none;background:#f7f7f7;background:-webkit-linear-gradient(top,#f7f7f7,#f4f4f4);background:-moz-linear-gradient(top,#f7f7f7,#f4f4f4);background:-o-linear-gradient(top,#f7f7f7,#f4f4f4);background:linear-gradient(to bottom,#f7f7f7,#f4f4f4);background-clip:padding-box;border-radius:0 0 5px 5px;margin:auto;position:relative;width:1000px;}
#header a{color:#4C9FEB;}
#header a:hover{color:#FF7D4C;}
#logo{float:left;margin:15px 10px;}
#logo img{border:0;}
#links{float:right;font-size:12px;margin:10px 20px 0;overflow:hidden;text-shadow:0 1px 0 #FFFFFF;}
#links a{border-left:1px solid #DEDEDE;margin-left:7px;padding-left:8px;text-decoration:none;}
#links a:first-child{border-width:0;}
/* navigation menu styles */
#navmenu{background:-webkit-linear-gradient(#f6f6f6,#e9eaea) repeat scroll 0 0 transparent;background:-moz-linear-gradient(#f6f6f6,#e9eaea) repeat scroll 0 0 transparent;background:linear-gradient(#f6f6f6,#e9eaea) repeat scroll 0 0 transparent;filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#f6f6f6',endColorstr='#e9eaea',GradientType=0 );border-radius:0 0 4px 4px;border-top:1px solid #D1D1D1;box-shadow:-1px 1px 0 rgba(255,255,255,0.8) inset;clear:both;height:51px;padding-top:1px;}
#menu{float:left;}
#menu a{text-decoration:none;}
#menu ul{list-style:none;margin:0;padding:0;}
#menu > ul > li{float:left;padding-bottom:12px;}
#menu ul li a{border-color:#D1D1D1;border-image:none;border-style:solid;border-width:0 1px 0 0;box-shadow:-1px 0 0 rgba(255,255,255,0.8) inset,1px 0 0 rgba(255,255,255,0.8) inset;color:#333333;display:block;font-size:14px;height:30px;line-height:30px;padding:11px 15px 10px;text-shadow:0 1px 0 #FFFFFF;}
#menu ul li a:hover{background:-webkit-linear-gradient(#efefef,#e9eaea) repeat scroll 0 0 transparent;background:-moz-linear-gradient(#efefef,#e9eaea) repeat scroll 0 0 transparent;background:linear-gradient(#efefef,#e9eaea) repeat scroll 0 0 transparent;filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#efefef',endColorstr='#e9eaea',GradientType=0 );}
#menu > ul > li.active > a{background:-webkit-linear-gradient(#55A6F1,#3F96E5) repeat scroll 0 0 transparent;background:-moz-linear-gradient(#55A6F1,#3F96E5) repeat scroll 0 0 transparent;background:linear-gradient(#55A6F1,#3F96E5) repeat scroll 0 0 transparent;filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#55A6F1',endColorstr='#3F96E5',GradientType=0 );border-bottom:1px solid #2D81CC;border-top:1px solid #4791D6;box-shadow:-1px 0 0 #55A6F1 inset,1px 0 0 #55A6F1 inset;color:#FFFFFF;margin:-1px 0 -1px -1px;text-shadow:0 -1px 0 rgba(0,0,0,0.3);}
#menu > ul > li.active > a:hover{background:-webkit-linear-gradient(#499FEE,#3F96E5) repeat scroll 0 0 transparent;background:-moz-linear-gradient(#499FEE,#3F96E5) repeat scroll 0 0 transparent;background:linear-gradient(#499FEE,#3F96E5) repeat scroll 0 0 transparent;filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#499FEE',endColorstr='#3F96E5',GradientType=0 );}
#menu > ul > li:first-child > a{border-radius:0 0 0 5px;}
/* dropdown menu */
#menu ul ul{background:-webkit-linear-gradient(#F7F7F7,#F4F4F4) repeat scroll 0 0 padding-box transparent;background:-moz-linear-gradient(#F7F7F7,#F4F4F4) repeat scroll 0 0 padding-box transparent;background:linear-gradient(#F7F7F7,#F4F4F4) repeat scroll 0 0 padding-box transparent;filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#F7F7F7',endColorstr='#F4F4F4',GradientType=0 );border:1px solid rgba(0,0,0,0.1);border-radius:5px 5px 5px 5px;box-shadow:0 1px 0 #FFFFFF inset;height:0;margin-top:10px;opacity:0;overflow:hidden;padding:0;position:absolute;visibility:hidden;width:250px;z-index:1;-webkit-transition:all .5s;-moz-transition:all .5s;-ms-transition:all .5s;-o-transition:all .5s;transition:all .5s;}
#menu ul li:hover ul{height:195px;margin-top:0\9;opacity:1;visibility:visible;}
#menu ul ul a{border-right-width:0;border-top:1px solid #D1D1D1;box-shadow:0 1px 0 #FFFFFF inset;color:#444444;height:24px;line-height:24px;padding:7px 12px;text-shadow:0 1px 0 #FFFFFF;}
#menu ul ul li:first-child a{border-top-width:0;}
#menu ul ul a .icon{background-position:50% 50%;background-repeat:no-repeat;display:block;float:left;height:24px;margin-right:10px;width:24px;}
#menu ul ul a .icon.elem0{background-image:url("../images/elem.png");}
#menu ul ul a .icon.elem1{background-image:url("../images/fb.png");}
#menu ul ul a .icon.elem2{background-image:url("../images/go.png");}
#menu ul ul a .icon.elem3{background-image:url("../images/rs.png");}
#menu ul ul a .icon.elem4{background-image:url("../images/sk.png");}
#menu ul ul a .icon.elem5{background-image:url("../images/su.png");}
/* search bar */
#search{margin:13px 10px 0 0;float:right;}
#search form{background:url("../images/search.gif") no-repeat scroll 5% 50% transparent;border:1px solid #CCCCCC;border-radius:3px 3px 3px 3px;box-shadow:0 1px 0 rgba(0,0,0,0.05) inset,0 1px 0 #FFFFFF;height:26px;padding:0 25px;position:relative;width:130px;}
#search form:hover{background-color:#F9F9F9;}
#search form input{color:#999999;font-size:13px;height:26px;text-shadow:0 1px 0 #FFFFFF;background:none repeat scroll 0 0 transparent;border:medium none;float:left;outline:medium none;padding:0;width:100%;}
#search form input.placeholder,#search form input:-moz-placeholder{color:#C4C4C4;}
附件:下载该文件资源,减少时间成本(增值服务)
留言
该资源可下载
File Source
.rar
14.37 KB
Html Js 菜单导航特效6
最新结算
股权转让协议意向书模板
类型: .docx 金额: CNY 2.23¥ 状态: 待结算 详细>
股权转让协议意向书模板
类型: .docx 金额: CNY 0.28¥ 状态: 待结算 详细>
CSS3图片向上3D翻转渐隐消失特效
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
CSS3图片向上3D翻转渐隐消失特效
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
.net c# 将金额转人名币大写金额
类型: .rar 金额: CNY 2.39¥ 状态: 待结算 详细>
.net c# 将金额转人名币大写金额
类型: .rar 金额: CNY 0.3¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 2.23¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 0.28¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 2.23¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 0.28¥ 状态: 待结算 详细>
我们力求给您提供有用的文章,再此基础上,会附加营收资源,不做任何广告,让平台可以更好发展 若您发现您的权利被侵害,或使用了您的版权,请发邮件联系 sunlifel@foxmail.com ggbig觉得 : 不提供源码的文章不是好文章
合作伙伴
联系我们
  • QQ:21499807
  • 邮箱:sunlifel@foxmail.com
  • QQ扫一扫加QQ
    QQ扫一扫
Copyright 2023-2024 ggbig.com·皖ICP备2023004211号-1
打赏文章