搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

:-moz-placeholder is no longer working on FF11

  • 3 个回答
  • 2 人有此问题
  • 3 次查看
  • 最后回复者为 cor-el

more options

This is no longer working:

-moz-placeholder {
 color: #f0f0f0; }

the placeholder color now rendering the textfield color

This is no longer working: :-moz-placeholder { color: #f0f0f0; } the placeholder color now rendering the textfield color

由rodm_sp于修改

所有回复 (3)

more options

Your CSS isn't valid. -moz-placeholder is pseudo-class. It must follow an element type, ID, class, etc.. Example:


input:-moz-placeholder { font-style: italic; color: silver }

<input id="example" type="text" placeholder="Click to make me go away.">


For details, see the following article: https://developer.mozilla.org/en/CSS/:-moz-placeholder

more options

Thanks for the reply.

The issue I found is that if you assigned a css color on your input field, the placeholder color will also use that even if you assigned a different color for placeholder.

Using your example:

input{color: red}

input:-moz-placeholder{color: green}


that won't work. The placeholder color will be RED instead of GREEN.

由rodm_sp于修改

more options

Seems to be working fine for me on Linux with Firefox 11 on the demo page after clearing the current value to make the placeholder text show.

input{color: red}
input:-moz-placeholder{color: green}

由cor-el于修改