Home  >  Article  >  Web Front-end  >  Modify the default color of the input box placeholder text-webkit-input-placeholder method_HTML/Xhtml_web page production

Modify the default color of the input box placeholder text-webkit-input-placeholder method_HTML/Xhtml_web page production

WBOY
WBOYOriginal
2016-05-16 16:36:062839browse

html5 adds a native placeholder attribute placeholder to input. Advanced browsers support this attribute, for example:

The default placeholder font color is light gray. If you want to change this default color, the solution is as follows:

XML/HTML CodeCopy content to clipboard
  1. input:-moz-placeholder,
  2. textarea:-moz-placeholder {
  3. color: #999999;
  4. }
  5. input:-ms-input-placeholder,
  6. textarea:-ms-input-placeholder {
  7. color: #999999;
  8. }
  9. input::-webkit-input-placeholder,
  10. textarea::-webkit-input-placeholder {
  11. color: #999999;
  12. }

The above method of modifying the default color of the input box placeholder text - webkit-input-placeholder is all the content shared by the editor. I hope it can give you a reference, and I hope you will support Script Home.

Original address: http://www.cnblogs.com/xjuan/p/5436037.html

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn