This question already has answers here:
Firefox: Transition placeholder opacity
                                
                                    (2个答案)
                                
                        
                                5年前关闭。
            
                    
由于某种原因,我似乎无法获得占位符转换以与Firefox一起使用。这是一个CodePen示例。此示例具有:hover:focus的占位符过渡。两者都适用于Chrome,而两者均不适用于Firefox。

最佳答案

除了需要the -moz prefix之外,我没有其他问题。尝试:

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;
}


另一方面,您的情况也可能与an actual bug有关。

09-25 16:50
查看更多