Home > Enterprise >  Placeholder of input text on my react component is not supporting:
Placeholder of input text on my react component is not supporting:

Time:01-09

I have used this code:
Color is not showing

.class::-webkit-input-placeholder 
{
color: red;
}

CodePudding user response:

::-webkit-input-placeholder doesn't apply to every browser
use ::placeholder

.class::placeholder{
    color: red;
}

CodePudding user response:

It seems ::-webkit-input-placeholder is not the correct way to do it.

You should use it like this:

::placeholder { /* Chrome, Firefox, Opera, Safari 10.1  */
  color: red;
  opacity: 1; /* Firefox */
}

:-ms-input-placeholder { /* Internet Explorer 10-11 */
  color: red;
}

::-ms-input-placeholder { /* Microsoft Edge */
  color: red;
}

Read more here: w3schools

  •  Tags:  
  • Related