jquery+css实现三款checkbox点击开关效果代码

代码语言:html

所属分类:表单美化

代码描述:jquery+css实现三款checkbox点击开关效果代码

代码标签: jquery css 三款 checkbox 点击 开关

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

<!DOCTYPE html>
<html lang="en" >
<head>
 
<meta charset="UTF-8">
<style>
    /*fonts*/
@import url("https://fonts.googleapis.com/css2?family=Montserrat+Alternates:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200");

.material-icons {
  font-family: "Material Icons";
  font-weight: normal;
  font-style: normal;
  font-size: 24px; /* Preferred icon size */
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;

  /* Support for all WebKit browsers. */
  -webkit-font-smoothing: antialiased;
  /* Support for Safari and Chrome. */
  text-rendering: optimizeLegibility;

  /* Support for Firefox. */
  -moz-osx-font-smoothing: grayscale;

  /* Support for IE. */
  font-feature-settings: "liga";
}
.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 24px; /* Preferred icon size */
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
}

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 48;
}
* {
  margin: 0;
  padding: 0;
  font-family: Montserrat;
  color: #333;
}
body {
  height: 100vh;
  background: linear-gradient(45deg, blanchedalmond, aliceblue);
  background: linear-gradient(-45deg, #e6cece, #e6cece);
}
main {
  display: flex;
  flex-direction: column;
  place-content: center;
  align-items: center;
  height: 100%;
}
.checkbox-container {
  margin: 48px 32px;
  position: relative;
  display: flex;
  align-items: center;
}
label {
  margin-left: 16px;
  font-size: 20px;
}
input {
  cursor: pointer;
}

.contai.........完整代码请登录后点击上方下载按钮下载查看

网友评论0