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

WBOY
Release: 2016-05-16 16:36:06
Original
2807 people have browsed it

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!