div+css实现三维拟物态checkbox小球滚动开关效果代码
代码语言:html
所属分类:表单美化
代码描述:div+css实现三维拟物态checkbox小球滚动开关效果代码
代码标签: div css 三维 拟物 checkbox 小球 滚动 开关
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<style>
body {
display: grid;
place-items: center;
height: 100vh;
width: 100vw;
overflow: hidden;
background: linear-gradient(to top, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.95)), linear-gradient(to bottom, #0070ff, #415fff);
}
body:before, body:after {
content: "";
position: absolute;
width: 240px;
height: 170px;
left: calc(50% - 2.5px);
top: 50%;
transform: translate(-50%, -50%);
background: #fff;
pointer-events: none;
box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85), 0 20px 40px 10px rgba(255, 255, 255, 0.85), 0 0 0 0.75px #415fff, 0 10px 40px -20px #0070ff, 0 20px 40px -20px #415fff;
}
body:after {
box-shadow: none;
background: linear-gradient(to bottom, #0070ff, #415fff);
mix-blend-mode: soft-light;
box-shadow: none;
z-index: 9;
}
body #wrap {
position: relative;
width: 50px;
height: 150px;
transform-style: preserve-3d;
perspective: 400px;
transform: translateX(-75px);
}
body #wrap:before, body #wrap:after {
content: "";
position: absolute;
width: 100%;
height: 100%;
background: #f2f2f2;
left: calc.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0