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;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 0;
  min-height: 100vh;
  font-size: 4rem;
  background: linear-gradient(135deg, #f0f0f5, #ccd);
  gap: 0.5em;
}

.toggle {
  --color: chartreuse;
  appearance: none;
  position: relative;
  font-size: 1em;
  width: 2.5em;
  aspect-ratio: 2.5;
  border-radius: 100vmax;
  box-shadow:
    in.........完整代码请登录后点击上方下载按钮下载查看

网友评论0