css - 暂停一个CSS动画

标签 css css-animations

我找到了问题的答案,但(作为新手)我不知道如何将它们应用到我正在使用的出色动画示例中。

我如何在悬停时暂停它?

.quote:nth-child(1) {
  -webkit-animation: cycle 15s 0s infinite linear;
  -moz-animation: cycle 15s 0s infinite linear;
  -ms-animation: cycle 15s 0s infinite linear;
  -o-animation: cycle 15s 0s infinite linear;
  animation: cycle 15s 0s infinite linear;
}

最佳答案

 .quote:hover { animation-play-state: paused; }

应该这样做。

文档:http://www.w3.org/TR/css3-animations/#animation-play-state

关于css - 暂停一个CSS动画,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19948514/

相关文章:

javascript - vue.js - 转换转换不工作

html - 制作一侧 flex 的矩形

animation - 带有变换的 CSS3 动画导致 Webkit 上的元素模糊

css - 在 CSS 下落动画中创建类似重力的效果并计算使用 rotateX 时 'circle' 半径的变化

html - 标签重叠并右对齐

html - 我想在悬停时更改图像的背景颜色

css - 使用 Angular ngAnimateSwap 指令的简单向前和向后 CSS 动画

html - 条纹 table 上的背景颜色褪色

CSS3 关键帧动画定格动画图像抖动

css - @import bootstrap.css 和@extend bootstrap 类选择器如何?