Modify the default color of the input box placeholder text -webkit-input-placeholder method

Modify the default color of the input box placeholder text -webkit-input-placeholder method

HTML5 adds a native placeholder attribute for input, which is supported by advanced browsers. For example:

<input type="text" placeholder="Search" value=" ">

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.   
  6. input:-ms-input-placeholder,
  7. textarea:-ms-input-placeholder {
  8. color: #999999;
  9. }
  10.   
  11. input::-webkit-input-placeholder,
  12. textarea::-webkit-input-placeholder {
  13. color: #999999;
  14. }

The above method of changing the default color of the input box placeholder text - webkit-input-placeholder is all the content that the editor shares with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM.

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

<<:  A summary of the reasons why Mysql does not use date field index

>>:  Detailed explanation of basic operation commands for Linux network settings

Recommend

Is a design that complies with design specifications a good design?

In the past few years of my career, I have writte...

CSS form validation function implementation code

Rendering principle In the form element, there is...

MySQL 8.0.12 Installation and Usage Tutorial

Recorded the installation and use tutorial of MyS...

Let you understand how HTML and resources are loaded

All content in this blog is licensed under Creati...

How does Zabbix monitor and obtain network device data through ssh?

Scenario simulation: The operation and maintenanc...

JavaScript BOM location object + navigator object + history object

Table of contents 1. Location Object 1. URL 2. Pr...

The front-end page pop-up mask prohibits page scrolling

A problem that front-end developers often encount...

CSS to achieve Cyberpunk 2077 style visual effects in a few steps

background Before starting the article, let’s bri...

React concurrent function experience (front-end concurrent mode)

React is an open-source JavaScript library used b...

How to use axios to make network requests in React Native

In front-end development, there are many ways to ...

MySQL knowledge points for the second-level computer exam mysql alter command

Usage of alter command in mysql to edit table str...

Detailed Introduction to MySQL Innodb Index Mechanism

1. What is an index? An index is a data structure...