title: Floating label in input field with supported all browsers, without js and without required attribute
body: <p>I have created floating label in input field.In chrome view is working fine, but not properly viewed in mozilla firefox, please anyone help me, how to write code,
  note: Kindly suggest without javascript and without required attribute in input field.</p>
  
  <p>My code is attached
  <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>.has-float-label
  {
      position:relative
  }
  .has-float-label label
  {
      position:absolute;
      left:0;top:0;
      cursor:text;
      font-size:75%;
      opacity:1;
      -webkit-transition:all .2s;
      transition:all .2s
  }
  .has-float-label select
  {
      -webkit-appearance:none;
      -moz-appearance:none;
      appearance:none
  }
  .has-float-label .form-control
  {
      font-size:inherit;
      padding-top:1em;
      margin-bottom:2px;
      border:0;
      border-radius:0;
      background:0 0;
      border-bottom:2px solid rgba(0,0,0,.1)
  }
  .has-float-label .form-control::-webkit-input-placeholder
  {
      opacity:1;
      -webkit-transition:all .2s;
      transition:all .2s
  }
  .has-float-label .form-control::-moz-input-placeholder
  {
      opacity:1;
      -moz-transition:all .2s;
      transition:all .2s
  }
  
  .has-float-label .form-control:placeholder-shown:not(:focus)::-webkit-input-placeholder
  {
      opacity:0
  }
  
  .has-float-label .form-control:placeholder-shown:not(:focus)::-moz-input-placeholder
  {
      opacity:0
  }
  
  .has-float-label .form-control:placeholder-shown:not(:focus)+label
  {
      font-size:150%;
      opacity:.5;
      top:.25em
  }
  .has-float-label .form-control:focus
  {
      outline:0;
      border-color:rgba(0,0,0,.5)
  }
  .input-group .has-float-label
  {
      display:inline-block
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="form-group has-float-label"&gt;
      &lt;input class="form-control" id="first" type="text" placeholder="First Last"/&gt;
      &lt;label for="first"&gt;Name&lt;/label&gt;
    &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>