这个是我的代码:
Document
*{
margin: 0;
padding: 0;
list-style:none;
}
.nav_1{
border-radius: auto;
box-shadow: 10px 10px 5px #888888;
text-align: right;
height: 50px;
margin-top: 50px;
margin-right: auto;
margin-bottom: 50px;
margin-left: auto;
background-color: #930;
}
.nav_1>ul{
display: inline-block;
list-style: none;
position: relative;
width: 960px;
margin-top: 0;
margin-right: auto;
margin-bottom: 0;
margin-left: auto;
text-align: center;
}
.nav_1>ul>li>a{
display: block;
width: 105px;
color: #FFFFFF;
text-align: center;
text-decoration: none;
background-color: #930;
}
.nav_1>ul>li{
line-height: 50px;
display: inline-block;
margin-right: auto;
margin-left: auto;
float: left;
font-family: "新宋体";
font-weight: bold;
}
.nav_1>ul>li>ul{
list-style: none;
display: none;
}
.nav_1>ul>li>ul>li{
display: block;
line-height: 25px;
}
.nav_1>ul>li>ul>li>a{
border-radius: 55px;
display: block;
width: 100px;
color: #FFFFFF;
text-align: center;
text-decoration: none;
line-height: 40px;
background-color: #F00;
}
.nav_1>ul>li:hover>ul{
display: block;
}
.nav_1 li a:hover{
color: #000;
text-decoration:none;
}
.nav_1 li ul li a:hover{
color: #ff0;
background-color: #000;
}
.nav_1 ul li a.thisclass{
border-radius: 15px;
text-decoration: none;
background-color: #F00;
}
$(function(){
var nav_1 = $(".nav_1 a");
nav_1.click(function(){
$(this).closest("ul").children("li").children("a").removeClass("thisclass");
$(this).addClass("thisclass");
});
});
查看更多关于网页的导航聚焦功能怎么聚焦在第二个网页上?_html/css_WEB-ITnose的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did109933