【问题标题】:CSS 3 fade animation on hover - issue in Opera悬停时的 CSS 3 淡入淡出动画 - Opera 中的问题
【发布时间】:2011-11-03 18:17:11
【问题描述】:

所以我有这些规则:

a{
  background-color: transparent;
  -webkit-transition: background-color .3s ease-in-out;
  -moz-transition: background-color .3s ease-in-out;
  -o-transition: background-color .3s ease-in-out;
  -ms-transition: background-color .3s ease-in-out;
  transition: background-color .3s ease-in-out;
}

a:hover{
 background-color: #fff;
}

这应该使浏览器在鼠标悬停时淡入/淡出白色背景。

它适用于 Chrome 和 Firefox,但在 Opera 中它会从灰色渐变为白色,而不是透明到白色...

我该如何解决这个问题?

谢谢

【问题讨论】:

    标签: css css-transitions


    【解决方案1】:

    我不知道你的明确问题的答案,但也许你从 rbga 过渡而不是从透明度过渡?

    a{
      background-color: rgba(255,255,255,1);
    }
    a:hover{
      background-color: rgba(255,255,255,0);
    }
    

    【讨论】:

    猜你喜欢
    • 2010-11-16
    • 1970-01-01
    • 2015-04-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多