Css text inputs effect with labels
<p>I have a text input field that has some label text nested inside it.When the user clicks to type in the field, on focus i am making the label text scale a little bit and moving it towards the top of the text field.
It all works fine until you move onto the next input field. Then the field you just entered a value in changes back to the default scale and position.But i want it to stay up there after the user has typed something inside it. Any help would be appreciated.</p>

<p><div class="snippet" data-lang="js" data-hide="false">
<div class="snippet-code">
<pre class="snippet-code-css lang-css prettyprint-override"><code>form {
  width: 100%;
  text-align: center;
  padding: 45px 0;
}
form div {
  background: transparent;
  height: 55px;
  width: 100%;
  margin-bottom: 55px;
  position: relative;
}
input {
  width: 80%;
  height: 78px;
  border-radius: 25px;
  border-top: 4px solid #0275F5;
  border-right: 4px solid #0275F5;
  border-left: 4px solid #0275F5;
  border-bottom: 4px solid #0275F5;
  outline: 0;
  font-size: 1.6em;
  font-weight: bold;
  display: block;
  margin: 0 auto;
  text-align: center;
}
.formHeading {
  font-size: 2.6em;
  color: #0275F5;
  text-transform: uppercase;
  text-align: center;
  margin-top: 0;
}
form div label {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 0 0.25em;
  width: 100%;
  height: calc(100% - 1em);
  text-align: center;
  pointer-events: none;
  transition: .25s;
  text-transform: uppercase;
  font-size: 1.6em;
}
input:focus + label {
  transform: translate3d(0, -.8em, 0) scale3d(0.55, 0.55, 1);
}</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="wrapper"&gt;
  &lt;h1 class="formHeading"&gt;Sign Up Form&lt;/h1&gt;
  &lt;form action="index.html" method="post"&gt;
    &lt;div&gt;
      &lt;input type="text" name="user_name" id="name"&gt;
      &lt;label&gt;Name&lt;/label&gt;
    &lt;/div&gt;
    &lt;div&gt;
      &lt;input type="email" name="user_email" id="email"&gt;
      &lt;label&gt;Email Address&lt;/label&gt;
    &lt;/div&gt;
    &lt;div&gt;
      &lt;input type="password" name="user_password" id="password"&gt;
      &lt;label&gt;Password&lt;/label&gt;
    &lt;/div&gt;
    &lt;div&gt;
      &lt;input type="text" name="user_city" id="city"&gt;
      &lt;label&gt;City&lt;/label&gt;
    &lt;/div&gt;
    &lt;div&gt;
      &lt;input type="text" name="user_gender" id="gender"&gt;
      &lt;label&gt;Gender&lt;/label&gt;
    &lt;/div&gt;
  &lt;/form&gt;
&lt;/div&gt;</code></pre>
</div>
</div>
</p>