ios - Safari 上的 CSS 动画错误

标签 ios css

我在 Safari 上有一个 CSS 动画错误,我创建的波浪动画没有按预期运行。

下面是我的动画关键帧:

@keyframes wave {
  20% {
    transform: translateY(-18px);
  }
  0%,
  40%,
  100% {
    transform: initial;
  }
}

我为它制作了一支笔 - https://codepen.io/ikhazen/pen/BXdqrN 它在其他浏览器中的行为与预期一致,但在 Safari iPhone 6s 上则不然。

解释我的 iPhone 上发生了什么。 前三个点同时动画,然后是第 4 个和第 5 个点。似乎 animation-delay 属性不是很好用。 有时,我注意到所有的点都在同时动画。这很奇怪。

谢谢

最佳答案

如果有人偶然发现这一点,请尝试在您的 animation-delay 属性中使用负值。

这是链接 https://codepen.io/ikhazen/pen/BXdqrN

&-6 {
  background: #c73e2c;
  animation-delay: -150ms;
  -webkit-animation-delay: -150ms;
}

&-5 {
  background: #ac3c3f;
  animation-delay: -300ms;
  -webkit-animation-delay: -300ms;
}

&-4 {
  background: #903a51;
  animation-delay: -450ms;
  -webkit-animation-delay: -450ms;
}

&-3 {
  background: #733866;
  animation-delay: -600ms;
  -webkit-animation-delay: -600ms;
}

&-2 {
  background: #573678;
  animation-delay: -750ms;
  -webkit-animation-delay: -750ms;
}

&-1 {
  background: #3c348a;
  animation-delay: -900ms;
  -webkit-animation-delay: -900ms;
}

关于ios - Safari 上的 CSS 动画错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57323743/

相关文章:

ios - 可见单元格的 Swift collectionView 方法未更改

html - CSS 箭头 : How can I center a text?

jquery - 具有相同选项的多个 slider 都在一个功能中?

iOS 我的标题、取消和保存按钮去哪儿了?

CSS 网格 - IE 11 重叠

CSS - 各种颜色的圆形边框

html - 如何删除单个表中两个 tds 之间的空格

ios - 将 Swift 文件导入 Obj-C 文件

ios - 如何在不使用 Marmalade 中的 s3eImagePicker 的情况下从 Gallery 获取所有文件?

ios - 快速滑动删除按钮的自定义高度