Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/39.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html CSS网络工具包动画';堆叠';多元_Html_Css_Webkit - Fatal编程技术网

Html CSS网络工具包动画';堆叠';多元

Html CSS网络工具包动画';堆叠';多元,html,css,webkit,Html,Css,Webkit,我一直在尝试使用webkit为一些评论制作循环滚动动画,但是每当我应用动画时,效果似乎会“叠加”,并且comment类的每个元素都会比之前的动画稍微快一些。这是我的密码: CSS HTML(大致如下,实际注释与PHP相互呼应) 1 2 三 4 您可以在页面底部的“评论”部分查看它的示例 .comment { content:''; -webkit-animation: movecomments 18s linear infinite; -moz-animation: movecomments

我一直在尝试使用webkit为一些评论制作循环滚动动画,但是每当我应用动画时,效果似乎会“叠加”,并且comment类的每个元素都会比之前的动画稍微快一些。这是我的密码:

CSS

HTML(大致如下,实际注释与PHP相互呼应)

1
2
三
4
您可以在页面底部的“评论”部分查看它的示例

.comment {
content:'';
-webkit-animation: movecomments 18s linear infinite;
-moz-animation: movecomments 18s linear infinite;
-o-animation: movecomments 18s linear infinite;
}
@-webkit-keyframes movecomments {
    0% {margin-top: 500px;}
    100% {margin-top: 0px;}
}
@-moz-keyframes movecomments {
    0% {margin-top: 500px;}
    100% {margin-top: 0px;}
}
@-o-keyframes movecomments {
    0% {margin-top: 500px;}
    100% {margin-top: 0px;}
<div class="comment">1</div>
<div class="comment">2</div>
<div class="comment">3</div>
<div class="comment">4</div>