css - 停止 CSS3 动画跳跃

标签 css svg css-animations animate.css

我有 following fiddle (仅限 Webbit/Chrome)。

只要看一会儿动画,您就会看到它“停”了一毫秒,然后又继续。它可能是 svg 文件本身吗?如果是这种情况,我该如何修复此文件以消除问题?

HTML

<div class="tile10"></div>

CSS

@-webkit-keyframes move {
    0% {
        background-position: 6px 0;  
    }
    100% {
        background-position: 6px 80px;  
    }
}


.tile10 {
    width: 80px;
    height: 80px;
    position: absolute;
    background: url(http://www.mauricederegt.nl/loopband.svg);
    background-repeat: repeat-y;
    -webkit-animation: move 3s linear infinite;   
    z-index: -1;
}

最佳答案

它确实在图像中。您的行高约 6 像素。 80不能被6整除,所以会有一点位移。然而,78 可以被 6 整除。

http://jsfiddle.net/rtS5U/5/

因此,与其向下移动 80px,不如向下移动 78px。

@-webkit-keyframes move {
    0% {
        background-position: 6px 0;  
    }
    100% {
        background-position: 6px 78px;  
    }
}

关于css - 停止 CSS3 动画跳跃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20758969/

相关文章:

html 和 css - 在不使用表格的情况下对齐文章的行和列

css - 调整背景 svg 的大小

python svgwrite 无法添加类属性?

CSS 变换和过渡

html - 为什么我的表格没有显示任何边框?

html - 为什么响应式设计中的固定宽度侧边栏不起作用?

css - 无法在 css-grid-animation 中进行渲染延迟?

CSS 动画没有遍历所有关键帧

html - 如何使用 Internet Explorer 将 div 居中?

javascript - 如何设置 SVG 内圆圈中的参数之一的样式?