![](/img/trans.png)
[英]Anchor link scroll animation only functions after refreshing (JQuery) on Squarespace
[英]Scroll to anchor after CSS animation?
我有这样的CSS动画:
@-webkit-keyframes flip {
0% {opacity:1;}
100% {opacity: 0;} //This could be 90%
//And here could be frame for 100% which would scroll it down.
}
#headercover {
-webkit-animation-name:flip;
-webkit-animation-duration:3s;
-webkit-animation-timing-function:ease;
-webkit-animation-delay:1s;
-webkit-animation-iteration-count:1;
-webkit-animation-play-state:running;
-webkit-animation-fill-mode: forwards;
我希望页面在动画的最后一帧之后向下滚动到锚点。 我对jQuery或JavaScript没有真正的经验,所以您能帮帮我吗?
请参阅网站: 此处
setTimeout(function(){
$('html, body').animate({
scrollTop: $("#elementtoScrollToID").offset().top
}, 2000);
}, 3000); // wait 3000 ms
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.