首页 > 解决方案 > Firefox 中的 CSS3 淡入效果?

问题描述

对于我的导航,我对子导航使用 CSS 淡入效果,但它仅适用于 Chrome,不适用于 Firefox。

.mega .hover ul.level-2 li:nth-child(5n+1) {
    -webkit-animation-delay: 0.2s;
    animation-delay: 0.2s;
  }

  .mega .hover ul.level-2 li:nth-child(5n+2) {
    -webkit-animation-delay: 0.4s;
    animation-delay: 0.4s;
  }

  .mega .hover ul.level-2 li:nth-child(5n+3) {
    -webkit-animation-delay: 0.55s;
    animation-delay: 0.55s;
  }

  .mega .hover ul.level-2 li:nth-child(5n+4) {
    -webkit-animation-delay: 0.65s;
    animation-delay: 0.65s;
  }

这是示例:http: //jsfiddle.net/rzf7w69u/28/

谢谢你的帮助。

标签: javascriptcss

解决方案


为 Firefox 和 Opera 使用前缀

 -webkit-animation-delay: 0.4s;
 -moz-animation-delay: 0.4s;
 -o-animation-delay: 0.4s;

推荐阅读