PHP 首页导航栏源代码 | 您所在的位置:网站首页 › 网站导航栏代码 › PHP 首页导航栏源代码 |
首页导航源栏代码为单独一个页面,其他页面引用使用,这样整网站的导航都可以统一管理。把下面的代码另存为menu.php 这里使用一个语句即可成功引用导航: 以下代码另存为menu.php *{margin:0; padding: 0;} #navcont { background: #fff; width: 100%;} #nav { font-family: helvetica; position:relative; width:377px; height:56px; font-size:14px; color:#999; margin: 0 auto; } #nav ul { list-style-type:none; } #nav ul li { float:left; position: relative;} #nav ul li a { border-right:1px solid #e9e9e9; padding:20px; display:block; text-decoration:none; text- align:center; color:#999;} #nav ul li a:hover {background: #12aeef url(http://files.jb51.net/demoimg/200912/shadow.png) repeat-x;; color:#fff;} #nav ul li ul {display: none;} #nav ul li:hover ul {display: block; position: absolute; top:56px; min-width:190px; left:0;} #nav ul li:hover ul li a {display:block; background:#12aeef; color:#ffffff; width: 110px; text-align: center; border-bottom: 1px solid #f2f2f2; border-right: none;} #nav ul li:hover ul li a:hover { background:#6dc7ec; color:#ffffff; } .borderleft {border-left: 1px solid #e9e9e9;} .top { border-top: 1px solid #f2f2f2;} /* This piece of code is for a third level drop down menu and is not included in this tutorial #nav ul li:hover ul li ul {display:none;} #nav ul li:hover ul li:hover ul {display:block; position: absolute; top:-1px; left: 151px;}*/ /* Ignore this last piece of code */ #threestyles { width: 500px; height: 300px; margin: 0px auto; border: 2px solid #666; margin-top: 30px; } 首页 添加客户资料 查询客户资料 |
CopyRight 2018-2019 实验室设备网 版权所有 |