title: I need to know why my Transition effect not working for input:checked::before
body: <p>I want to give transition effect to the before element of input when
  checked but it's not working.</p>
  <p>I need to know why this is not working.
  Or else I have to try something new</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>input[type="checkbox"]{
    width: 160px;
    height: 50px;
    appearance: none;
    outline: none;
    position: absolute;
    align-items: center;
    display: flex;
    margin: 13px;
  }
  
  input[type="checkbox"]:checked::before{
    position: absolute;
    right: 0;
    transition: 0.5s linear;
  }
  
  input[type="checkbox"]::before{
    content: '';
    width: 75px;
    height: 44px;
    right: 100;
    position: absolute;
    margin: 1px;
    transition: 0.5s ;    
  }
  
  div{
    width: 200px;
    height: 70px;
    position: absolute;
    align-items: center;
    display: flex;
    margin: 20px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;input type="checkbox"&gt;</code></pre>
  </div>
  </div>
  </p>