Created
March 25, 2013 21:52
-
-
Save sdthornton/5241150 to your computer and use it in GitHub Desktop.
Smooth removal of placeholder text on focus
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input { | |
border: solid 1px #bbb; | |
padding: 5px; | |
} | |
input:focus::-webkit-input-placeholder { | |
color: transparent; | |
-webkit-transition: color 0.5s 0.5s ease; | |
transition: color 0.5s 0.5s ease; | |
} | |
input:focus:-moz-placeholder { | |
color: transparent; | |
-moz-transition: color 0.5s 0.5s ease; | |
transition: color 0.5s 0.5s ease; | |
} | |
input:focus::-moz-placeholder { | |
color: transparent; | |
} | |
input:focus:ms-input-placeholder { | |
color: transparent; | |
-ms-transition: color 0.5s 0.5s ease; | |
transition: color 0.5s 0.5s ease; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment