【发布时间】:2013-04-29 05:07:52
【问题描述】:
我想使用转换使输入占位符在焦点上平滑淡出,但无法让它在 FF 中工作。
<input type="text" placeholder="some cool text"/>
input:focus::-moz-placeholder {
opacity: 0.1;
}
input::-moz-placeholder {
opacity: 1;
transition: opacity 1s;
}
input::-moz-placeholder {
opacity: 1;
}
input:focus::-webkit-input-placeholder {
opacity: 0.1;
}
在 Chrome 中运行良好,但在 FF 中不行。 占位符按预期更改焦点上的不透明度,但不会出现 1s 过渡。它也绝对不能在 IE 中工作
编辑:显然这是最新版本 FF (20.0.1) 中的错误
【问题讨论】:
标签: html css css-transitions