div+css实现逼真立体checkbox开关按钮效果代码
代码语言:html
所属分类:表单美化
代码描述:div+css实现逼真立体checkbox开关按钮效果代码
代码标签: div css 逼真 立体 checkbox 开关 按钮
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
body {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
row-gap: 0.5em;
min-height: 100vh;
background-color: #e8e1d6;
font-size: 3em;
}
.toggle-wrapper {
display: flex;
justify-content: center;
align-items: center;
position: relative;
border-radius: 0.5em;
padding: 0.125em;
background-image: linear-gradient(to bottom, #d0c4b8, #f5ece5);
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.6);
}
.toggle-checkbox {
-webkit-appearance: none;
appearance: none;
position: absolute;
z-index: 1;
border-radius: inherit;
width: 100%;
heigh.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0