div+css实现NF竖状checkbox开关效果代码

代码语言:html

所属分类:布局界面

代码描述:div+css实现NF竖状checkbox开关效果代码

代码标签: div css NF 竖状 checkbox 开关

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum=1.0,minimum=1.0,user-scalable=0" />

     <style>
          body{
         padding: 100px;
     }
     .container {
  margin: auto;
  color: hsl(0, 0%, 30%);
  font-weight: 900;
  font-size: 6rem;
  display: flex;
}

.toggle {
  width: 60px;
  height: 155px;
  background-color: hsl(0, 0%, 80%);
  border-radius: 1.7rem;
  padding: .25rem 0;
  cursor: pointer;
  display: flex;
  justify-content: center;
  transition: background-color 300ms 300ms;
}

.toggle__circle {
  width: 50px;
  height: 50px;
  background-color: hsl(0, 0%, 95%);
  border-radius: 50%;
  margin-top: calc(155px - (.25rem * 2) - 50px).........完整代码请登录后点击上方下载按钮下载查看

网友评论0