jquery自定义弹性select下拉选择框效果代码
代码语言:html
所属分类:表单美化
代码描述:jquery自定义弹性select下拉选择框效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<html>
<head>
<style>
*, *:before, *:after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
background: #35414a;
}
.drop {
width: 20em;
margin: 5em auto;
font-family: pfs-bold;
color: #86919a;
text-transform: uppercase;
position: relative;
transition: width 0.5s;
will-change: width;
}
.drop .option {
padding: 1em;
cursor: pointer;
background-color: #485761;
}
.drop .option:not(.active) {
display: none;
opacity: 0;
transform: translateY(-50%);
}
.drop.visible {
-webkit-animation: bounce 1s;
animation: bounce 1s;
width: 24em;
}
.drop.visible:before, .drop.visible:after {
border-color: #fff;
}
.drop.visible:before {
opacity: 0;
}
.drop.visible:after {
opacity: 1;
}
.drop.visible .option {
color: #fff;
display: block;
}
.drop.opacity .option {
transform: translateZ(0);
opacity: 1;
}
.drop.opacity .option:nth-child(0) {
transition: opacity 0.5s 0s, transform 0.5s 0s;
}
.drop.opacity .option:nth-child(1) {
transition: opacity 0.5s 0.1s, transform 0.5s 0.1s;
}
.drop.opacity .option:nth-child(2) {
transition: opacity 0.5s 0.2s, transform 0.5s 0.2s;
}
.drop.opacity .option:nth-child(3) {
transition: opacity 0.5s 0.3s, transform 0.5s 0.3s;
}
.drop.opacity .option:nth-child(4) {
transition: opacity 0.5s 0.4s, transform 0.5s 0.4s;
}
.drop.opacity .option:nth-child(5) {
transition: opacity 0.5s 0.5s, transform 0.5s 0.5s;
}
.drop.o.........完整代码请登录后点击上方下载按钮下载查看
网友评论0