我想像这样跨多个浏览器定位占位符
.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>
还是有另一种方法?
(对菜鸟问题很抱歉)
谢谢!
用户代理必须忽略具有未知选择器的规则。
*一组包含无效选择器的选择器无效。
因此,我们需要为每个浏览器使用单独的规则。否则,整个组将被所有浏览器忽略。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句