- 首页 > it技术 > >
Document - 锐客网.box {
width: 300px;
height: 300px;
margin: 100px auto;
border: 1px solid #ff0000;
}.select-box {
font-family: PingFangSC-Regular;
position: relative;
margin: 100px auto;
width: 220px;
height: 32px;
line-height: 32px;
border: 1px solid #d9d9d9;
box-sizing: border-box;
border-radius: 4px 4px 0 0;
white-space: nowrap;
color: #666;
background: url("./images/down.png") no-repeat right center;
}
.text {
position: absolute;
left: 5px;
top: 0;
max-width: 200px;
overflow: hidden;
color: #333;
text-overflow: ellipsis;
}
.select-option {
display: none;
position: absolute;
left: 0;
top: 31px;
height: 128px;
width: 100%;
border: 1px solid #d9d9d9;
border-top: none;
overflow: hidden;
box-sizing: border-box;
}.option-box {
position: absolute;
top: 0;
left: 0;
width: 240px;
height: 100%;
overflow-y: auto;
box-sizing: border-box;
}.option {
width: 100%;
height: 32px;
cursor: default;
}.option:hover {
background: #8FC65E;
color: #fff;
}
自定义的selelct兼容ie67814234234356
123454366
12345534536
45353454
1234234456
推荐阅读