Coder Wrap provides free to use snippets Coder Wrap provides free to use snippets

🗙
Login
Register

Create Account

Cancel
Back to CSS3
Preview Source Code
Download
HTML
CSS
  /**Typeo CSS Start**/
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');
*{ box-sizing: border-box;}

body {
  font-family: "Poppins", sans-serif;
  color: #444;
  box-sizing: border-box;
  background-color: #f5f5f5;
}
.checkradio-container {
  display: flex;
  flex-direction: row;
  width: 100;
  align-items: center;
}
/**Typeo CSS End**/
fieldset {
  border: none;
  display: flex;
  flex-direction: column;
  margin: 20px;
  align-items: flex-start;
  min-width: 400px;
}
label {
  display: flex;
  flex-direction: row;
  align-items: center;
}
.aside {
  color: #ccc;
}
input {
  position: relative !important;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  margin: 8px;
  box-sizing: content-box;
  overflow: hidden;
}
input:before {
  content: '';
  display: block;
  box-sizing: content-box;
  width: 16px;
  height: 16px;
  border: 2px solid #ccc;
  transition: 0.2s border-color ease;
}
input:checked:before {
  border-color: #62ab64;
  transition: 0.5s border-color ease;
}
input:disabled:before {
  border-color: #ccc;
  background-color: #ccc;
}
input:after {
  content: '';
  display: block;
  position: absolute;
  box-sizing: content-box;
  top: 50%;
  left: 50%;
  transform-origin: 50% 50%;
  background-color: #62ab64;
  width: 16px;
  height: 16px;
  border-radius: 100vh;
  transform: translate(-50%, -50%) scale(0);
}
/**Radio CSS**/
input[type="radio"]:before {
  border-radius: 100vh;
}
input[type="radio"]:after {
  width: 16px;
  height: 16px;
  border-radius: 100vh;
  transform: translate(-50%, -50%) scale(0);
}
input[type="radio"]:checked:after {
  -webkit-animation: toggleOnRadio 0.2s ease forwards;
          animation: toggleOnRadio 0.2s ease forwards;
}
/**Radio CSS**/
/**Checkbox CSS**/
input[type="checkbox"]:before {
  border-radius: 4px;
}
input[type="checkbox"]:after {
  width: 9.6px;
  height: 16px;
  border-radius: 0;
  transform: translate(-50%, -85%) scale(0) rotate(45deg);
  background-color: transparent;
  box-shadow: 4px 4px 0px 0px #62ab64;
}
input[type="checkbox"]:checked:after {
  -webkit-animation: toggleOnCheckbox 0.2s ease forwards;
          animation: toggleOnCheckbox 0.2s ease forwards;
}
input[type="checkbox"].filled:before {
  border-radius: 4px;
  transition: 0.2s border-color ease, 0.2s background-color ease;
}
input[type="checkbox"].filled:checked:not(:disabled):before {
  background-color: #62ab64;
}
input[type="checkbox"].filled:not(:disabled):after {
  box-shadow: 4px 4px 0px 0px white;
}
@-webkit-keyframes toggleOnCheckbox {
  0% {
    opacity: 0;
    transform: translate(-50%, -85%) scale(0) rotate(45deg);
  }
  70% {
    opacity: 1;
    transform: translate(-50%, -85%) scale(0.9) rotate(45deg);
  }
  100% {
    transform: translate(-50%, -85%) scale(0.8) rotate(45deg);
  }
}
@keyframes toggleOnCheckbox {
  0% {
    opacity: 0;
    transform: translate(-50%, -85%) scale(0) rotate(45deg);
  }
  70% {
    opacity: 1;
    transform: translate(-50%, -85%) scale(0.9) rotate(45deg);
  }
  100% {
    transform: translate(-50%, -85%) scale(0.8) rotate(45deg);
  }
}
@-webkit-keyframes toggleOnRadio {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
  }
  70% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.9);
  }
  100% {
    transform: translate(-50%, -50%) scale(0.8);
  }
}
@keyframes toggleOnRadio {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
  }
  70% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.9);
  }
  100% {
    transform: translate(-50%, -50%) scale(0.8);
  }
}
/**Checkbox CSS**/

Related Snippets

Leave a comment

Your email address will not be published. Required fields are marked *