Home > Article > Web Front-end > How to change the default text color of the input box
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:
6d48b7b3730da4e882dde57e6abcb3b6The 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; }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!