jquery+css实现checkbox、radio开关美化效果代码

代码语言:html

所属分类:表单美化

代码描述:jquery+css实现checkbox、radio开关美化效果代码

代码标签: jquery css checkbox radio 开关 美化

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

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">

    <link href="https://fonts.googleapis.com/css?family=Roboto:700" rel="stylesheet">
<style>
    html,
body {
  height: 100%;
}

body {
  background: #ff9e21;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-family: "Roboto", sans-serif;
}

.radio {
  background: #1e1e1e;
  border-radius: 50px;
  padding: 10px 15px;
  color: #626262;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 45px;
  width: 245px;
  font-size: 21px;
  position: relative;
  transition: all 0.5s ease-in-out;
  margin-bottom: 20px;
}
.radio.off {
  background: #fff;
}
.radio.off .bar {
  background: #ccc;
  left: 136px;
}
.radio.off label[for=on] {
  color: #626262;
}
.radio.off label[for=off] {
  color: #000;
}
.radio .wrap {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 50px;
  overflow: hidden;
  position: relative;
  height: 40px;
}
.radio input {
  opacity: 0;
  pointer-events: none;
}
.radi.........完整代码请登录后点击上方下载按钮下载查看

网友评论0