Input piola

PHOTO EMBED

Mon Jun 13 2022 02:20:39 GMT+0000 (UTC)

Saved by @ktoranzo #html #css

html
<div class="input-group" style="top: 15px">
        <input type="text" id="name" required class="input" />
        <label for="name" class="input-label"> Email address </label>
</div>


css

.input-group {
  position: relative;
}
.input {
  padding: 10px;
  border: none;
  border-radius: 4px;
  font: inherit;
  color: #fff;
  background-color: transparent;
  outline: 2px solid #d1c5fc;
}
.input-label {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(10px, 10px);
  transition: transform 0.25s;
}
.input:focus + .input-label,
.input:valid + .input-label {
  transform: translate(10px, -14px) scale(0.8);
  color: #000;
  padding-inline: 5px;
  background: #fff;
}
.input:is(:focus, :valid) {
  outline-color: #b2a7d7;
}
content_copyCOPY