mercredi 31 octobre 2018

Icon inside on focus

I have input and on focus I show omg before placeholder and text, but now displays from top to down and I need from left to right and best used transforms, and it would be from left to right just as it is now text. Can someone help me?

Thank you.

input[type="text"] {
  width: 100%;
  height: 25px;
  padding: 1rem;
  font-size: 14px;
  border: 1px solid #e6e6e6;
  outline: none;
  transition: all .2s linear;
}
input[type="text"]:focus {
  background: url("https://svgshare.com/i/97k.svg") no-repeat;
  background-size: 27px 27px;
  background-position: 5px center;
  background-color: white;
  padding-left: 35px;
  border-color: #cccccc;
  color: black;
  transform-origin: 50% 50%;
}
<input type="text" placeholder="Text">



Aucun commentaire:

Enregistrer un commentaire