[英]Placeholder of input text on my react component is not supporting:
I have used this code:我用过这段代码:
Color is not showing颜色不显示
.class::-webkit-input-placeholder
{
color: red;
}
It seems ::-webkit-input-placeholder is not the correct way to do it.似乎::-webkit-input-placeholder不是正确的方法。
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;
}
::-webkit-input-placeholder
doesn't apply to every browser ::-webkit-input-placeholder
并不适用于所有浏览器
use::placeholder使用::占位符
.class::placeholder{
color: red;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.