您的位置:首页 > 编程语言 > ASP

在ASP.NET MVC中实现一种不同于平常的三级联动、级联方式, 可用于城市、车型选择等多层级联场景

2014-12-18 09:42 726 查看
三级或多级联动的场景经常会碰到,比如省、市、区,比如品牌、车系、车型,比如类别的多级联动......我们首先想到的是用三个select来展示,这是最通常的做法。但在另外一些场景中,比如确定搜索条件的时候,对于三级联动来说,可能选择1个,2个,或3个条件,我想,以下的方式可能更适合:

展开#carcategory-picker-outer {
background: #f9f9f9;
padding: 10px;
width: 640px;
height: 380px;
position: relative;
display: none;
}

#PreLetter {
border: 0px solid blue;
width: 21px;
float: left;
}

#PreLetter a:link{
display: block;
text-decoration: none;
clear: both;
font-size: 10px;
text-align: center;
padding-top: 0px;
border: 1px solid #e3e3e3;
width: 15px;
height: 15px;
background-color: #e9e9e9;
margin-top: 2px;
font-weight: bold;
}

#PreLetter a:hover {
border: 1px solid blue;
}

#PreLetter a:visited {
border: 1px solid #e3e3e3;
}

#pinpai {
border: 0px solid green;
float: left;
}

#AllPinPai {
border: 1px solid #e3e3e3;
margin-left: 5px;
float: left;
padding-bottom: 0px;
width: 120px;
height: 340px;
overflow-y: auto;
}

#AllPinPai dl dd a {
text-decoration: none;
display: block;
padding-left: 10px;
}

#AllPinPai dl dd {
padding-left: 0px;
}

#AllPinPai dl dd a:hover {
/*background-color: gray;*/
color: white;
}

#AllPinPai dl {
margin-bottom: 5px;
}

#chexi {
border: 0px solid orange;
float: left;
margin-left: 10px;
display: none;
}

#AllCheXi {
width: 150px;
height: 340px;
overflow-y: auto;
border: 1px solid #e3e3e3;
}

#AllCheXi dl dd a {
text-decoration: none;
display: block;
padding-left: 10px;
}

#AllCheXi dl dd {
padding-left: 0px;
}

#AllCheXi dl dd a:hover {
color: white;
}

#AllCheXi dl {
margin-bottom: 5px;
}

#chexin {
border: 0px solid red;
float: left;
margin-left: 10px;
display: none;
}

#AllCheXing {
width: 300px;
height: 340px;
overflow-y: auto;
border: 1px solid #e3e3e3;

}

#AllCheXing dl dd a {
text-decoration: none;
display: block;
padding-left: 10px;
}

#AllCheXing dl dd {
padding-left: 0px;
}

#AllCheXing dl dd a:hover {
background-color: gray;
color: white;
}

#AllCheXing dl {
margin-bottom: 5px;
}

dt {
background-color: #e9e9e9;
padding-left: 10px;
}

dl {
border: 0px solid red;
}

dd {
padding-left: 10px;
line-height: 15px;
margin-top: 5px;
margin-bottom: 0px;
border: 0px solid blue;
/*background-color: gray;*/
}

.selected {
background-color: gray;
color: white;
}

.cancel {
width: 20px;
height: 17px;
position: absolute;
display: block;
top: 20px;
right: 20px;
background-image: url("../img/close.png");
border: 1px solid orangered;
background-color: orangered;
}

.input-group {
width: 640px;
}[/code]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: