Skip to content

Instantly share code, notes, and snippets.

@thedaviddias
Created December 2, 2012 21:27
Show Gist options
  • Save thedaviddias/4191147 to your computer and use it in GitHub Desktop.
Save thedaviddias/4191147 to your computer and use it in GitHub Desktop.
CSS: Plaholder style
input::-webkit-input-placeholder {
color: #999;
}
input:-moz-placeholder {
color: #999;
}
input:-ms-input-placeholder {
color: #999;
}
input:focus::-webkit-input-placeholder {
color: #d6d6d6;
}
input:focus:-moz-placeholder {
color: #d6d6d6;
}
input:focus:-ms-input-placeholder {
color: #d6d6d6;
}
<h1>Style placeholder with CSS</h1>
<form action="">
<input id="name" name="name" placeholder="Ecrivez votre nom" required>
<button type="submit">Valider</button>
</form>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment