Animate HTML <input> placeholder text change - HTML CSS CSS Animation

HTML CSS examples for CSS Animation:Text

Description

Animate HTML <input> placeholder text change

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">

input {transition:color 1s;}
input::-webkit-input-placeholder { /* WebKit browsers */
color:#0000ff;transition:color 1s;
}
input::-moz-placeholder { /* Mozilla Firefox */
color:blue;transition:color 1s;
}
input:-ms-input-placeholder { /* IE 10+ */
color:blue;transition:color 1s;
}
input:focus::-webkit-input-placeholder {color:#ff0000;}


      </style> 
 </head> <!--   w  w  w.j  a v a 2 s. c  om-->
 <body> 
  <input type="text" placeholder="placeholder's text">  
 </body>
</html>

Related Tutorials