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

Super simple qps statistics method (recommended)

Statistics of QPS values ​​in the last N seconds ...

Three ways to create a gray effect on website images

I’ve always preferred grayscale images because I t...

Implementation of Docker Compose multi-container deployment

Table of contents 1. WordPress deployment 1. Prep...

Things to note when designing web pages for small-screen mobile devices

The reason is that this type of web page originate...

VMware Workstation virtual machine installation operation method

Virtual machines are very convenient testing soft...

Mysql practical exercises simple library management system

Table of contents 1. Sorting function 2. Prepare ...

Nginx service 500: Internal Server Error one of the reasons

500 (Internal Server Error) The server encountere...

vue+springboot realizes login verification code

This article example shares the specific code of ...

A brief discussion on the use of GROUP BY and HAVING in SQL statements

Before introducing the GROUP BY and HAVING clause...

How to install and use Cockpit on CentOS 8/RHEL 8

Cockpit is a web-based server management tool ava...

A detailed explanation of how React Fiber works

Table of contents What is React Fiber? Why React ...

How to clear the validation prompt in element form validation

Table of contents Problem scenario: Solution: 1. ...

How to use positioning to center elements (web page layout tips)

How to center an element in the browser window He...

HTML is the central foundation for the development of WEB standards

HTML-centric front-end development is almost what ...