How to change the default text color of the input box

php中世界最好的语言
Release: 2018-01-23 11:16:07
Original
8723 people have browsed it

This time I will show you how to modify the default text color of the input box. What are the precautions for modifying the default text color of the input box? The following is a practical case, let's take a look.

html5 Added native placeholder attribute placeholder. Advanced browsers support this attribute, for example:

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

input:-moz-placeholder,   
textarea:-moz-placeholder {   
    color: #999999;   
}   
  
input:-ms-input-placeholder,   
textarea:-ms-input-placeholder {   
    color: #999999;   
}   
  
input::-webkit-input-placeholder,   
textarea::-webkit-input-placeholder {   
    color: #999999;   
}
Copy after login

I believe you have mastered the methods after reading these cases. For more exciting information, please pay attention to php Chinese website

Other related articles!

Related reading:

How should HTML tables be laid out

What is the difference between class and id when marking HTML elements

How to achieve the effect of clicking the button text into an input box, and clicking save to turn it into text

The above is the detailed content of How to change the default text color of the input box. For more information, please follow other related articles on the PHP Chinese website!

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!