最近因为项目需求,需要一个筛选功能,由于技术有限,搞了两天也没搞出来,最后还是在一位大神的帮助下实现了这个功能,防止时间长了忘记,在这里记录一下。
一. html/css代码
<style>
.select{
width:100%;
height:40px;
line-height: 40px;
text-align:center;
background:#fff;
border-bottom: 1px solid #e6e6e6;
position:fixed;
z-index: 15;
}
.select ul li{
float:left;
width:33.1%;
height:40px;
color: #8f8f8f;
text-align: center;
border-right:1px solid #e6e6e6;
}
.select ul li:last-child{
border-right:none;
}
.select ul li span{
width:15px;
height:15px;
display:inline-block;
position:relative;
top: 2px;
left: 2px;
background:url(img/xiala.png) no-repeat center;
background-size: 12px;
}
.select_con{
width: 100%;
height: 100%;
position: fixed;
bottom: 0px;
z-index: 10;
background: rgba(0,0,0,.5);
display: none;
top: 81px;
}
.tab_con{
width: 100%;
float: left;
z-index: 999;
min-height: 40px;
position: relative;
}
.select_con ul li{
height:40px;
line-height:40px;
text-align:left;
text-indent:20px;
border-bottom:1px solid #e6e6e6;
}
.select_con_left{
width:50%;
max-height: 328px;
float:left;
background:#FFF;
overflow:scroll;
}
.select_con_middle{
width:100%;
max-height: 328px;
background:#FFF;
overflow:scroll;
}
.select_con_right{
width:50%;
max-height: 328px;
float:left;
background:#f2f2f2;
overflow