<section>
  <h1>SVG CheckBox</h1>
  <h2>Line CheckBox</h2>
  
  <div class="form-section">
    <form class="form-target">
      <ul>
        <li>
          <input type="checkbox" id="check-00" />
          <label for="check-00">Drawing a check box
          <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
	 y="0px" viewBox="0 0 325.1 27" style="enable-background:new 0 0 325.1 27;" xml:space="preserve">
	<path class="st0" d="M5,7.7c105.3,1.2,210.7,0.6,316-2"/>
	<path class="st1" d="M13,20.2c102.7,3.1,205.5,2.1,308-2.9"/>
</svg>
          </label>
        </li>
        <li>
          <input type="checkbox" id="check-01" />
          <label for="check-01">Drawing a check box
          <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
	 y="0px" viewBox="0 0 325.1 27" style="enable-background:new 0 0 325.1 27;" xml:space="preserve">
	<path class="st0" d="M5,7.7c105.3,1.2,210.7,0.6,316-2"/>
	<path class="st1" d="M13,20.2c102.7,3.1,205.5,2.1,308-2.9"/>
</svg>
          </label>
        </li>
        <li>
          <input type="checkbox" id="check-02" />
          <label for="check-02">Drawing a check box
          <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
	 y="0px" viewBox="0 0 325.1 27" style="enable-background:new 0 0 325.1 27;" xml:space="preserve">
	<path class="st0" d="M5,7.7c105.3,1.2,210.7,0.6,316-2"/>
	<path class="st1" d="M13,20.2c102.7,3.1,205.5,2.1,308-2.9"/>
</svg>
          </label>
        </li>
       
      </ul>
    </form>
 </div>
</section>
html,body{
  height:100%;
  display: block;
}

body{
   font-family: 'Comfortaa', cursive;
}

h1 {
  text-align: center;
  letter-spacing: 2px;
  font-weight: 700;
  font-size:50px;
  margin-bottom:0px;
}

h2{
  text-align: center;
  font-size:20px;
  font-weight: 400;
  margin-top:5px;
}

.form-section{
  width: 400px;
  margin: 40px auto 0px auto;
}

ul li{
  list-style: none;
  color: #000;
  font-size:25px;
  position: relative;
  margin-bottom: 25px;
}

input[type=checkbox]{
  display: none !important;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  outline: none;
  display: inline-block;
  vertical-align: top;
  position: relative;
  &:focus{
    outline:rgba(0,0,0,0);
  }
  &:checked{
    border: 3px solid #000;
  }
  &:checked ~ label{
    color: #000;
  }
  &:checked ~ label:before{
    border: 3px solid #000;
  }
  &:checked ~ label svg path{
    stroke-dashoffset:0;
    stroke-opacity:1;
  }
}

label{
  cursor: pointer;
  color: #999;
  transition: color 0.3s;
}

label:before{
  content : '';
  display: inline-block;
  width: 28px;
  height: 28px;
  margin-right: 15px;
  position: relative;
  top: 7px;
  border: 3px solid #999;
  border-radius: 3px;
}

svg{
  width: 350px;
  height: 30px;
  left : 7px;
  top :9px;
  position: absolute;
  z-index: 1;
  path{
    fill: none;
    stroke: #000;
    stroke-linejoin:round;
    stroke-linecap:round;
    stroke-dasharray: 320;
    stroke-dashoffset:320;
    stroke-opacity:0;
    stroke-width:3px;
  }
  .st0{
    transition: stroke-dashoffset 0.3s ease, stroke-opacity 0.3s;
  }
  .st1{
    transition: stroke-dashoffset 0.3s 0.3s ease, stroke-opacity 0.3s 0.3s;
  }
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js