.mydiv::after {
    border-bottom: 2px solid #4387F4;
    transform: scaleX(0);
    transition: transform 200ms cubic-bezier(0.0, 0, 0.2, 1) 0ms;
}

.myinput:focus {
    outline: none;
}

.myinput:focus + .label-name .content-name,
.myinput:valid + .label-name .content-name {
  transform: translateY(-150%);
  font-size: 14px;
  left: 0px;
  color: #fce38a;
}
.myinput:focus + .label-name::after,
.myinput:valid + .label-name::after {
  transform: translateX(0%);
}

.form {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  margin-top: 10px;
  margin-bottom: 20px;
}

.form input {
  border: none;
  height: 1.1876em;
  margin: 0;
  padding: 16px 0 7px;
  width: 100%;
}
.form label {
  position: absolute;
  bottom: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
  pointer-events: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.42);
  
}
.form label::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0px;
  width: 100%;
  height: 100%;
  border-bottom: 2px solid #4387F4;
  transform: translateX(-100%);
  transition: transform 200ms cubic-bezier(0.0, 0, 0.2, 1) 0ms;
}

.content-name {
  position: absolute;
  bottom: 0px;
  left: 0px;
  padding: 6px 0 7px;
  transition: all 0.3s ease;
  font-size: 1rem;
  color: rgba(0, 0, 0, 0.54);
}
.form input:focus {
  outline: none;
}

.form input:focus + .label-name .content-name,
.form input:valid + .label-name .content-name,
.form input:not(:placeholder-shown) + .label-name .content-name {
  transform: translate(0, -50%) scale(0.75);
  transform-origin : top left;
  font-size: 1rem;
  left: 0px;
  color: #4387F4;
}
.form input:focus + .label-name::after,
.form input:not(:placeholder-shown) + .label-name::after,
.form input[value=''] + .label-name::after {
  transform: translateX(0%);
}

