CSS3占位符悬停转换无法在Firefox中运行 [英] CSS3 Placeholder hover Transition not working in Firefox

查看:107
本文介绍了CSS3占位符悬停转换无法在Firefox中运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

出于某种原因,我似乎无法让占位符转换与Firefox一起使用。这是一个 CodePen 示例。此示例具有:hover :focus 的占位符转换。两者都可以与Chrome一起使用,也不适用于Firefox。

For some reason I cant seems to get placeholder transitions to work with Firefox. Here is a CodePen example. This example has placeholder transitions for both :hover and :focus. Both work with Chrome, neither work with Firefox.

推荐答案

除了需要 -moz 前缀。尝试:

I haven't had a problem other than needing the -moz prefix. Try:

h1 {
  color: #300;
  -moz-transition: color 2s;
  -webkit-transition: color 2s;
  -o-transition: color 2s;
  -ms-transition: color 2s;
  -transition: color 2s;
}
h1:hover {
  color: #933;
}

另一方面,您的情况可能与实际的错误

On the other hand, your situation may be related to an actual bug, too.

这篇关于CSS3占位符悬停转换无法在Firefox中运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆