Css 如何更改占位符的颜色?
如何更改选定输入字段占位符的颜色Css 如何更改占位符的颜色?,css,Css,如何更改选定输入字段占位符的颜色 input[type="text"].smInput{ color: #333; } 占位符文本作为伪元素公开给CSS,因此请使用伪元素选择器。它尚未标准化,因此您需要为支持它的布局引擎重复选择器: input[type=text].smInput::-moz-placeholder, input[type=text].smInput:-ms-input-placeholder, /* IE uses a pseudo-class rather than ps
input[type="text"].smInput{
color: #333;
}
占位符文本作为伪元素公开给CSS,因此请使用伪元素选择器。它尚未标准化,因此您需要为支持它的布局引擎重复选择器:
input[type=text].smInput::-moz-placeholder,
input[type=text].smInput:-ms-input-placeholder, /* IE uses a pseudo-class rather than pseudo-element */
input[type=text].smInput::-webkit-input-placeholder, {
color: #333;
}
资料来源:
站点:stackoverflow.com我们如何更改占位符的颜色
input[type=text].smInput::-moz-placeholder,
input[type=text].smInput:-ms-input-placeholder, /* IE uses a pseudo-class rather than pseudo-element */
input[type=text].smInput::-webkit-input-placeholder, {
color: #333;
}
input:-moz-placeholder, textarea:-moz-placeholder{
color: #222;
}
input::-webkit-input-placeholder, textarea::-moz-placeholder{
color: #222;
}