css实现齿轮checkbox胶囊选择效果代码
代码语言:html
所属分类:表单美化
代码描述:css实现齿轮checkbox胶囊选择效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
* {
border: 0;
box-sizing: border-box;
margin: 0;
padding: 0;
}
:root {
font-size: calc(24px + (32 - 24) * (100vw - 320px) / (1280 - 320));
}
body, input {
font: 1em/1.5 sans-serif;
}
body {
background: #abafba;
height: 100vh;
display: grid;
place-items: center;
}
.saw-switch {
border-radius: 2.5em;
width: 8em;
height: 5em;
}
.saw-switch__inner, .saw-switch__blade, .saw-switch__particle {
pointer-events: none;
}
.saw-switch__inner, .saw-switch__input {
position: relative;
}
.saw-switch__inner {
display: block;
margin: 1em;
width: calc(100% - 2em);
height: calc(100% - 2em);
-webkit-tap-highlight-color: transparent;
}
.saw-switch__input {
b.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0