原生js实现省市区三级联动下拉选择效果代码
代码语言:html
所属分类:其他
代码描述:原生js实现省市区三级联动下拉选择效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://at.alicdn.com/t/c/font_3918133_49o7mt0f52q.css">
<STYLE>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
list-style: none;
}
.container {
width: 100vw;
height: 100vh;
display: flex;
justify-content: center;
background-color: #011627;
color: #fff;
padding-top: 50px;
}
.select {
position: relative;
margin: 0 10px;
/* 内容不换行 */
white-space: nowrap;
}
.title {
min-width: 150px;
height: 40px;
padding: 0 10px;
display: flex;
justify-content: space-between;
align-items: center;
border-radius: 5px;
font-size: 14px;
color: #999;
border: 1px solid #5f7e97;
cursor: pointer;
}
.title > .iconfont {
font-size: 10px;
transition: 0.3s linear;
}
.options {
position: absolute;
top: 52px;
padding: 10px;
min-width: 100%;
font-size: 12px;
border: 1px solid #5f7e97;
background-color: #011627;
border-radius: 5px;
max-height: 300px;
opacity: 0;.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0