css 浏览器兼容性 firefox 不工作

标签 css browser

我正在开发一个新网站,但是当我的 friend 在 Firefox 上测试它时,其中一项功能无法正常工作。

我们发现 css 在 Firefox 中不起作用,但在 Chrome 中却可以工作。

完整代码:https://jsfiddle.net/wvkL6d2b/

我们尝试过 -webkit-和-ms-

 #separator{      width: 10px!important; max-width: 60px!important; height: 10px; background:red;}

  @keyframes in-out {
         from { width: 10px;
        }
              10%, 100% {
                  width: 60px;
              }
        to{ width: 60px; }
    }
  #separator {
        animation-name: in-out;
      animation-duration: 8s;
      animation-iteration-count: infinite;
      animation-timing-function: linear;
      animation-delay: 2s;
      }

我正在尝试让它在两种浏览器上运行

最佳答案

你写的CSS属性有很多错误。请在 fiddle 中找到更新的代码。 这些应该是要使用的属性。

 #separator {
   height: 10px;
   background: red;
   -webkit-animation: mymove 5s infinite; /* Safari 4.0 - 8.0 */
  animation: mymove 5s infinite;
 }

@-webkit-keyframes mymove {
  0% { width: 10px; }
  100% { width: 100px; }
}

/* Standard syntax */
@keyframes mymove {
  0% { width: 10px; }
  100% { width: 100px; }
}

关于css 浏览器兼容性 firefox 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55609248/

相关文章:

internet-explorer - 如何运行所有三个版本的 Internet Explorer?

javascript - 单行 HTML CSS 上的长响应标题

Jquery,获取样式: background (not background-color),边框等,无法弄清楚如何做到这一点

javascript - 让 SlideJS 全屏工作

javascript - 运行此程序浏览器显示 "Upgrade Required"

c# - 可以广播到浏览器的桌面应用程序

javascript - 在选择元素中选择选项元素时更改浏览器的蓝色默认颜色

html - 我在移动设备上的下拉菜单不起作用

html - 社交媒体图标响应

javascript - 在与 Electron 相同的 BrowserWindow 中有两个独立的(在历史/cookies/localstorage 方面)BrowserViews