【发布时间】:2021-07-28 05:55:46
【问题描述】:
我想在我的网站主页上创建一些 css 动画,并带有一些笔记。
这是示例:(链接不再演示行为)
我们可以看到音符正在下降,那么在下一个序列之前我们什么都没有。http://labandallonnaise.org/joomla/
这里是代码
.notes-wrapper {
overflow: hidden;
height: 630px;
top: 0px;
right: 0px;
bottom: 0px;
left: 0px;
margin-top: -75px;
margin-bottom: -75px;
margin-left: -500px;
margin-right: -500px;
}
.notes {
background: url("gantry-theme://custom/images/background.svg") center !important;
height: 6300px;
animation: fall 10s linear infinite;
overflow: hidden;
z-index: 0;
background-repeat: repeat;
background-size: cover;
top: 0px;
}
.notes img {
animation: none;
background: transparent;
}
@keyframes fall {
0% {
transform: translateY(-1050px);
}
}
<div class="notes-wrapper">
<img style="display: block; margin-left: auto; margin-right: auto; animation: none; background: transparent;" src="images/logo/BandAllonnaisedudule.png" alt="" />
<div class="notes"> </div>
</div>
我怎样才能有连续的动画?
【问题讨论】:
-
您可以尝试将
animation-iteration-count: infinite;添加到 .notes 选择器吗? -
不幸的是它没有帮助
-
我更新了网站并停止了动画,因为这正在修改标题显示(如果没有响应问题,我无法设置固定位置)
标签: html css sass css-animations