为什么把鼠标移入ui-search-select-list里面第二背景没有发生改变,点击ui-search-select-list不会隐藏
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title></title>
<script src="js/jquery-1.7.1.js"></script>
<style>
*{
padding:0;
margin:0;
border:0;
}
/*此处填写css样式*/
body{
margin:0;
padding:0;
}
.wrap{
width:1000px;
margin:0 auto;
position:relative;
}
.top{
background:#f5f5f5;
color:#868686;
font-size:13px;
line-height: 50px;;
height:50px;
}
p{
margin:0;
padding:0;
display:inline-block;
}
.call{
background:url(http://img1.sycdn.imooc.com/climg//58c61b9d0001e02d00170017.png)no-repeat center left;
float:left;
padding-left: 30px;;
}
.top .welcome{
float:right;
}
.top a{
color:#2da5e1;
}
a{
text-decoration: none;
}
.header{
height:92px;
}
.clearfix{
content:"";
height:0;
zoom: 1;
display:block;
clear: both;
}
.logo{
display:block;
width:402px;
height:72px;
padding:9px 0;
}
.logo img{
width:100%;
height:100%;
}
.search{
position:absolute;
background:url(http://img1.sycdn.imooc.com/climg//58c61b7e00012b9303260038.jpg) no-repeat center;
width:326px;
height:50px;
right:0px;
top:29px;
}
.search .ui-search-select{
display: inline-block;
position:absolute;
left:12px;
top:12px;
color:#fff;
}
.search .ui-search-select-list a{
display:block;
color:#A5a2a2;
padding-top: 5px;;
}
.search .ui-search-select-list a:hover{
background-color:#ebeef5;
}
.search .ui-search-select-list {
display:none;
position:absolute;
left:0px;
top:44px;
background:#fff;
width:60px;
text-align: center;
height:80px;
box-shadow: 3px 3px 5px rgba(0,0,0,0.2);
}
.search .ui-search-input{
display: block;
position: absolute;
top:22px;
left:115px;
}
.nav{
background:#60bff2;
height:36px;
}
.nav .link{
line-height: 36px;
padding-right: 30px;
color:#fff;
}
.nav .right{
padding-left:260px ;
}
.content-nav .logo1 img{
width:100px;
height:40px;
position: absolute;
top:20px;
left:50px;
z-index:0;
}
.content-nav .link1{
position: absolute;
left:65px;
top:20px;
display:block;
z-index:1;
color:#fff;
line-height: 40px;
}
.link-wrap{
height:90px;
width:1000px;
border: 1px solid rgb(241, 234, 234);
border-top:3px solid #60bff2;
position: absolute;
top:60px;
left:50px;
}
.content-nav .link{
display:inline-block;
width:100px;
padding-right:12px;
font-size:15px;
color: #666;
}
.content-nav .link2{
position: absolute;
top:30px;
right:50px;
}
.content-nav .link-wrap .wrap1{
margin:7px 0 0 15px;
width:700px;
}
.content-tab{
position: absolute;
left:159px;
top:357px;
height:270px;
width:300px;
border: 1px #dddddd solid;
}
.content-tab .list-item{
width:200px;
height: 30px;
position: relative;
top:10px;
}
.content-tab i{
position: absolute;
top:5px;
left:8px;
width:20px;
height:25px;
display: inline-block;
background: url(http://img1.sycdn.imooc.com/climg//58c61b610001c58300440638.jpg) 0 0 no-repeat ;
}
.content-tab a{
position: absolute;
top:5px;
left:28px;
color: #666;
}
.content-tab a:after{
content:'>';
font-size:20px;
position: absolute;
left:238px;
top:-5;
}
.content-tab .i1{
background-position: 0px -21px;
}
.content-tab .i2{
background-position: 0px -43px;
}.content-tab .i3{
background-position: 0px -65px;
}
.content-tab .i4{
background-position: 0px -87px;
}
.content-tab .i5{
background-position: 0px -109px;
}
.content-tab .i6{
background-position: 0px -131px;
}
.content-tab .i7{
background-position: 0px -153px;
}
.content-item{
width:700px;
border:1px #dddddd solid;
position:relative;
left:480px;
right:20px;
top:180px;
}
.lista{
display:block;
padding: 30px 0 10px 20px;
}
.content-item .content-list-item{
padding-bottom: 20px;
width:660px;
border-top:1px #dddddd dashed;
margin: 0 auto;
}
.content-item .content-list-item a{
display:inline-block;
width:80px;
padding:20px 0 0 30px;
color:#666;
font-size:14px;
}
footer{
position: relative;
top:220px;
background: #666;
width:100%;
height:80px;
text-align: center;
}
footer p{
line-height: 80px;
font-size: 18px;
color:#868686
}
</style>
</head>
<body>
<div class="top">
<!-- top区域 -->
<div class="wrap clearfix">
<p class="call">010-114-11611</p>
<p class="welcome">欢迎来到城市预约统一挂号平台 请
<a href="#" >登录</a >
<a href="#">注册</a>
<a href="#">帮助中心</a>
</p>
</div>
</div>
<!-- header区域 -->
<div class="header">
<div class="wrap clearfix">
<a class="logo" href="#"><img src="http://img1.sycdn.imooc.com/climg//58c61b2f0001f5c008400172.png"></a>
<div class="search ui-search">
<div class="ui-search-select">医院</div>
<div class="ui-search-select-list">
<a href="#1">科室</a>
<a href="#1">疾病</a>
<a href="#1">医院</a>
</div>
<input type="text" class="ui-search-input" placeholder="请输入搜素内容">
<a href="#" class="ui-search-submit"></a>
</div>
</div>
</div>
<div class="nav">
<div class="wrap">
<a href="#" class="link">全部科室</a>
<a href="#" class="link">按医院挂号</a>
<a href="#" class="link">按科室挂号</a>
<a href="#" class="link">按疾病挂号</a>
<a href="#" class="link">最新公告</a>
<a href="#" class="link right">社会知名医院</a>
</div>
</div>
<div class="content">
<div class="wrap content-nav clearfix">
<a href="#" class="link1" >热门科室</a>
<a href="#" class="logo1 ">
<img src="http://img1.sycdn.imooc.com/climg//58c61a4f0001967a01380030.jpg"></a>
<div class="link-wrap">
<div class="wrap1">
<a href="#" class="link">神经外科</a>
<a href="#" class="link">妇科</a>
<a href="#" class="link">产科</a>
<a href="#" class="link">儿科</a>
<a href="#" class="link">骨科</a>
<a href="#" class="link">眼科</a>
<a href="#" class="link">耳鼻喉科</a>
<a href="#" class="link">肿瘤科</a>
<a href="#"class="link">肿瘤综合科</a>
<a href="#"class="link" >皮肤美容</a>
<a href="#"class="link" >心里咨询</a>
<a href="#"class="link" >中医科</a>
<a href="#" class="link2">展开全部</a>
</div>
</div>
</div>
<div class="content-tab clearfix">
<div class="list-item">
<i></i>
<a href="#">内科</a>
</div>
<div class="list-item">
<i class="i1"></i>
<a href="#">外科</a>
</div>
<div class="list-item">
<i class="i2"></i>
<a href="#">妇产科</a>
</div>
<div class="list-item">
<i class="i3"></i>
<a href="#">生殖中心</a>
</div>
<div class="list-item">
<i class="i4"></i>
<a href="#">儿科</a>
</div>
<div class="list-item">
<i class="i5"></i>
<a href="#">骨外科</a>
</div>
<div class="list-item">
<i class="i6"></i>
<a href="#">内科</a>
</div>
<div class="list-item">
<i class="i7"></i>
<a href="#">眼科</a>
</div>
</div>
<div class="content-item">
<div class="content-list">
<a href="#" class="lista">内科</a>
<div class="content-list-item">
<a href="#">心血管内科</a>
<a href="#">神经内科</a>
<a href="#">消化内科</a>
<a href="#">内分泌科</a>
<a href="#">免疫科</a>
<a href="#">呼吸科</a>
<a href="#">肾病内科</a>
<a href="#">血液科</a>
<a href="#">感染内科</a>
<a href="#">过敏反应科</a>
<a href="#">老年病科</a>
<a href="#">普通内科</a>
<a href="#">高压氧科</a>
</div>
</div>
<div class="content-list">
<a href="#" class="lista">内科</a>
<div class="content-list-item">
<a href="#">心血管内科</a>
<a href="#">神经内科</a>
<a href="#">消化内科</a>
<a href="#">内分泌科</a>
<a href="#">免疫科</a>
<a href="#">呼吸科</a>
<a href="#">肾病内科</a>
<a href="#">血液科</a>
<a href="#">感染内科</a>
<a href="#">过敏反应科</a>
<a href="#">老年病科</a>
<a href="#">普通内科</a>
<a href="#">高压氧科</a>
</div>
</div>
<div class="content-list">
<a href="#" class="lista">内科</a>
<div class="content-list-item">
<a href="#">心血管内科</a>
<a href="#">神经内科</a>
<a href="#">消化内科</a>
<a href="#">内分泌科</a>
<a href="#">免疫科</a>
<a href="#">呼吸科</a>
<a href="#">肾病内科</a>
<a href="#">血液科</a>
<a href="#">感染内科</a>
<a href="#">过敏反应科</a>
<a href="#">老年病科</a>
<a href="#">普通内科</a>
<a href="#">高压氧科</a>
</div>
</div>
<div class="content-list">
<a href="#" class="lista">内科</a>
<div class="content-list-item">
<a href="#">心血管内科</a>
<a href="#">神经内科</a>
<a href="#">消化内科</a>
<a href="#">内分泌科</a>
<a href="#">免疫科</a>
<a href="#">呼吸科</a>
<a href="#">肾病内科</a>
<a href="#">血液科</a>
<a href="#">感染内科</a>
<a href="#">过敏反应科</a>
<a href="#">老年病科</a>
<a href="#">普通内科</a>
<a href="#">高压氧科</a>
</div>
</div>
</div>
</div>
<footer>
<p>Copyright@2017慕课网版权所有</p>
</footer>
<script type="text/javascript" >
//此处填写jQuery代码
$(function(){
$('.ui-search-select').on('click',function(){
$('.ui-search-select-list').show();
return false;
});
//为什么这里没有执行
$('body').on('cilck',function(){
$('.ui-search-select-list').hide();
});
$('.ui-search-select-list a ').on('cilck',function(){
$('.ui-search-select').text($(this).text());
$('.ui-search-select-list').hide();
return false;
})
})
</script>
</body>
</html>
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星