简体   繁体   English

如何在页面加载后 2 秒内使图像淡出

[英]How to make an image fade in 2 seconds after page is loaded

So basically I have SVG image of this arrow in my website, and I already have an animation set to it with CSS, so it can move up and down.所以基本上我的网站上有这个箭头的 SVG 图像,我已经用 CSS 设置了 animation,所以它可以上下移动。

The problem is everything fades in when the page loads (because I've added CSS animations to them) and I was hoping if someone could help me to make the arrow fade in not just appear using JavaScript.问题是页面加载时一切都消失了(因为我已经向它们添加了 CSS 动画),我希望是否有人可以帮助我使箭头淡入而不仅仅是使用 JavaScript 出现。

You can use the CSS property transition-delay (supposing you are using CSS for the fading).您可以使用 CSS 属性transition-delay (假设您使用 CSS 进行衰落)。 See W3Schools for more information.有关详细信息,请参阅W3Schools

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM