Style for placeholder input

2

Style for placeholder input

How to styles for placeholder text in html ?

At here, I use input email have Id is “email”:

<input type="text" id="email" placeholder="Your Email" />

style placeholder

And to style for placeholder text of that input. Please use 4 line CSS as below:

input#email::-webkit-input-placeholder {color:red} //Chrome and Safari
input#email:-moz-placeholder {color:red} //Firefox
input#email::-moz-placeholder {color:red} //Firefox
input#email:-ms-input-placeholder {color:red} //IE

 

Result:

style placeholder
Thanks for watching!

Review this post

68%
68%
Awesome
  • Bad
    3
  • Normal
    6
  • Good
    8
  • Excellent
    10
  • User Ratings (1 Votes)
    8.1

About Author

Là một developer rất ham chơi nhưng không ham hố, không ham chơi nhưng rất thích cầm đầu...

2 Comments

%d bloggers like this: