Custom checkbox example

Quick example of an alternative to the standard browser checkbox input field What is a custom checkbox example How do you make a custom checkbox example? This script and codes were developed by António Capelo on 18 February 2022, Friday.

How do I make an custom checkbox example?
  1. Custom checkbox example Previews
  2. Custom checkbox example HTML Codes
  3. Custom checkbox example CSS Codes
Custom checkbox example Previews

Custom checkbox example HTML Codes

<!DOCTYPE html>
<html >
<head>
  <meta charset="UTF-8">
  <title>Custom checkbox example</title>
  
  
  
      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>
  <div class="todos-container">
  <h1 class="desc">Custom checkbox example</h1>
  <ul class="todo-list shadow">
    <li class="todo-item-container" ng-class="{done: utils.isTodoDone(item)}">
      <div class="checkboxcontainer">
        <input id="todo{{item.id}}" type="checkbox" ng-model="item.done"/>
        <label for="todo{{item.id}}"></label>
      </div>
        <span class="todo-item-text">Check this out</span>
    </li>
  </ul>
</div>
  
  
</body>
</html>

Custom checkbox example CSS Codes

@import url(https://fonts.googleapis.com/css?family=Oswald:400,300,700);
* {
  box-sizing: border-box;
}

html {
  font-family: 'Oswald', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  width: 100%;
  height: 100%;
  position: fixed;
  font-family: 'Oswald', Helvetica, Arial, sans-serif;
  padding: 2em 2em 4em;
  font-size: 16px;
  line-height: 1.5em;
  color: #312a18;
  background: #6F696E;
  -webkit-box-shadow: 0 0 2px rgba(0, 0, 0, 0.06);
  -moz-box-shadow: 0 0 2px rgba(0, 0, 0, 0.06);
}

.shadow {
  -moz-box-shadow: 0 8px 86px 1px black;
  -webkit-box-shadow: 0 8px 86px 1px black;
  box-shadow: 0 8px 86px 1px black;
}

.todos-container {
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  font-family: 'Oswald',Helvetica, Arial, sans-serif;
  text-align: center;
}
.todos-container .desc {
  background: transparent;
  color: #8B1D1D;
  font-size: 38px;
  margin-bottom: 60px;
  line-height: 40px;
}
.todos-container .todo-item-container {
  width: 300px;
  border: 1px solid grey;
  background: white;
  list-style: none;
  padding: 10px;
  max-width: 798px;
  width: 100%;
  border-top: 1px dotted black;
  font-size: 26px;
  line-height: 26px;
  text-align: center;
}
.todos-container .todo-list {
  max-width: 800px;
  width: 100%;
  padding: 0;
  margin: 0 auto;
}

.checkboxcontainer {
  position: relative;
  width: 25px;
}
.checkboxcontainer input {
  display: none;
}
.checkboxcontainer label:hover::after {
  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
  filter: alpha(opacity=50);
  opacity: 0.5;
}
.checkboxcontainer input[type=checkbox]:checked + label:after {
  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
  filter: alpha(opacity=100);
  opacity: 1;
}
.checkboxcontainer label {
  cursor: pointer;
  position: absolute;
  width: 22px;
  height: 22px;
  top: 3px;
  left: 0;
  background: #eee;
  border: 1px solid #ddd;
}
.checkboxcontainer label:after {
  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0.1)";
  filter: alpha(opacity=0.1);
  opacity: 0.1;
  content: '';
  position: absolute;
  width: 7px;
  height: 4px;
  background: transparent;
  top: 5px;
  left: 5px;
  border: 3px solid #333;
  border-top: none;
  border-right: none;
  -webkit-transform: rotate(-45deg);
  -moz-transform: rotate(-45deg);
  -o-transform: rotate(-45deg);
  -ms-transform: rotate(-45deg);
  transform: rotate(-45deg);
}

.checkboxcontainer label:hover::after {
  opacity: 0.5;
}
Do you want hide your ip address?Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup.