LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code
CSS
html {
  height: 100%;
}
body {
  height: 100%;
  background: #C1D1DA;
  background: radial-gradient(ellipse at center, #5c5d5f 0%, #2f3031 100%);
}
.wrap {
  position: relative;
  margin: 100px auto;
  width: 90px;
  height: 100px;
  border: 1px solid #1F1F20;
  border-radius: 5px;
  background: linear-gradient(to bottom, #3a3b3c 0%, #1c1c1d 100%);
  box-shadow: inset 0 3px 4px -2px #5e6060, 0 0 6px -1px rgba(0, 0, 0, 0.8), 0 2px 7px -1px rgba(0, 0, 0, 0.5);
}
.wrap .line {
  position: absolute;
  top: 50px;
  width: 100%;
  border-top: 1px solid #1B1B1C;
  border-bottom: 1px solid #323334;
}
.switch {
  position: relative;
  display: block;
  margin: 13px 17px;
  width: 55px;
  height: 25px;
  border: 1px solid #1A1A1B;
  border-radius: 20px;
  background: linear-gradient(to bottom, #1f1f20 0%, #3a3a3a 100%);
  box-shadow: 0 1px 1px 0 rgba(130, 132, 134, 0.6), inset 0 4px 0 -3px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: box-shadow 0.5s ease 0.27s, border-color 0.5s ease 0.27s;
  user-select: none;
}
.switch:hover .slide:after {
  opacity: .05;
}
.switch.p2 {
  margin-top: 25px;
}
.switch:after {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  background: green;
  background: linear-gradient(to bottom, #ba6552 0%, #d79765 100%);
  content: "";
  opacity: 0;
  transition: opacity .5s ease .27s;
}
.switch:before {
  position: absolute;
  display: block;
  width: 95%;
  height: 60%;
  border-radius: 20px;
  background: #fff;
  content: "";
  opacity: .03;
}
.switch .icon-off,
.switch .icon-eye-open {
  position: absolute;
  z-index: 2;
  display: block;
  line-height: 25px;
  font-size: 18px;
}
.switch .icon-eye-open {
  left: 5px;
  color: #EDD6CD;
  text-shadow: 0 1px 0 #97614B;
}
.switch .icon-off {
  top: 1px;
  right: 5px;
  color: #6D6F70;
}
.switch .slide {
  position: absolute;
  top: -1px;
  left: -2px;
  z-index: 5;
  width: 25px;
  height: 25px;
  border: 1px solid #171718;
  border-radius: 50%;
  background: linear-gradient(to bottom, #404142 0%, #1e1e1f 100%);
  box-shadow: inset 0 1px 2px 0 rgba(93, 94, 95, 0.8), 1px 3px 5px -2px rgba(0, 0, 0, 0.7);
  transition: left 0.4s ease-in, border-color 0.4s ease-in 0.1s;
}
.switch .slide:after {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(to bottom, #f3e8df 0%, #cca98c 100%);
  content: "";
  opacity: 0;
  transition: opacity .4s ease .1s;
}
input[type=checkbox] {
  display: none;
}
input[type=checkbox]:checked + .switch {
  border-color: #4D2318;
  box-shadow: 0 1px 1px 0 rgba(130, 132, 134, 0.6), inset 0 4px 0 -3px rgba(0, 0, 0, 0.3), 0 0 15px 0 rgba(213, 147, 99, 0.7);
}
input[type=checkbox]:checked + .switch:after {
  opacity: 1;
}
input[type=checkbox]:checked + .switch .slide {
  left: 29px;
  border-color: #704F3F;
}
input[type=checkbox]:checked + .switch .slide:after {
  opacity: 1;
}
Host Instantly Drag and Drop Website Builder

 

Description

Design belongs: http://dribbble.com/shots/745485-Switch?list=users
Term
Mon, 11/27/2017 - 21:58

Related Codes

Pen ID
Pen ID
Pen ID