海上船只checkbox动画切换效果
代码语言:html
所属分类:表单美化
代码描述:海上船只checkbox动画切换效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
* {
margin: 0;
padding: 0;
}
.wrapper {
position: absolute;
background: #2b3e51;
width: 100%;
height: 100%;
overflow-y: scroll;
}
.wrapper .switch {
position: absolute;
left: 50%;
top: 60%;
transform: translate(-50%, -50%);
width: 120px;
height: 50px;
}
.wrapper .switch input {
display: none;
}
.wrapper .switch .wave {
position: absolute;
top: 0;
left: 0;
border-radius: 40px;
width: 120px;
height: 50px;
display: none;
}
.wrapper .switch .wave:after {
content: "";
width: 60px;
height: 3px;
border-radius: 100%;
background: #fff;
position: absolute;
top: 3px;
left: 20%;
opacity: 0.4;
}
.wrapper .switch .wave:before {
content: "";
width: 35px;
height: 2px;
border-radius: 100%;
background: #fff;
position: absolute;
top: 10px;
left: 30%;
opacity: 0.3;
}
.wrapper .switch .slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #e74a42;
transition: all 1.4s;
border-radius: 50px;
z-index: 100;
overflow: hidden;
}
.wrapper .switch .slider:before,
.wrapper .switch .slider:after {
position: absolute;
content: "";
height: 40px;
width: 40px;
left: 5px;
bottom: 5px;
border-radius: 30px;
background-color: #fff;
}
.wrapper .switch .slider:before {
transition: 0.4s;
}
.wrapper .switch .slider:after {
transition: 0.5s;
}
.wrapper .switch .slider .fish {
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0