【发布时间】:2016-01-16 18:27:55
【问题描述】:
我想像这样在多个浏览器中定位占位符
.editor textarea::-webkit-input-placeholder,
.editor textarea:-moz-placeholder,
.editor textarea::-moz-placeholder,
.editor textarea:-ms-input-placeholder
{
color: red;
}
但这不起作用
我必须为每个单独做吗
.editor textarea:-ms-input-placeholder
{
color: red;
}
html如下:
<div class="editor">
<textarea placeholder="This will be the heading sentence..."></textarea>
</div>
或者还有其他方法吗?
(抱歉这个菜鸟问题)
谢谢!
【问题讨论】:
-
同时提供您的 HTML 代码
-
总之,你做不到。检查这个答案stackoverflow.com/a/2610741/5794995
-
我明白了,我希望有 :) 谢谢
标签: css placeholder