【发布时间】:2016-12-18 04:52:16
【问题描述】:
我制作了一个向下滚动的动画按钮,但动画不起作用。
我不知道怎么了。我已经用-webkit-animation: sdb10 2s infinite 和animation: sdb10 2s infinite 试过了,但看起来没有效果。
.scrolldown span {
position: absolute;
top: 0;
width: 30px;
height: 50px;
border: 2px solid #1F1F1F;
border-radius: 50px;
box-sizing: border-box;
}
.scrolldown {
position: fixed;
width: 30px;
height: 75px;
bottom: -25px;
left: 50%;
z-index: 2;
display: inline-block;
-webkit-transform: translate(0, -50%);
transform: translate(0, -50%);
letter-spacing: .1em;
text-decoration: none;
transition: opacity .3s;
}
.scrolldown span::before {
position: absolute;
top: 10px;
left: 50%;
content: '';
width: 6px;
height: 6px;
margin-left: -3px;
background-color: #1F1F1F;
border-radius: 100%;
-webkit-animation: sdb10 2s infinite;
animation: sdb10 2s infinite;
box-sizing: border-box;
}
.scrolldown span::after {
position: absolute;
bottom: -20px;
left: 50%;
width: 18px;
height: 18px;
content: '';
margin-left: -9px;
border-left: 2px solid #1F1F1F;
border-bottom: 2px solid #1F1F1F;
-webkit-transform: rotate(-45deg);
transform: rotate(-45deg);
-webkit-animation: sdb05 1.5s infinite;
animation: sdb05 1.5s infinite;
box-sizing: border-box;
}
<div class="scrolldown">
<span></span>
</div>
【问题讨论】:
-
请更新您的问题以包括您的
animation的keyframes。 -
@Shaggy 关键帧是什么意思?
-
你需要阅读how to use animations。
-
@Shaggy 这就是重点!知道了,谢谢