gpt4 book ai didi

页面加载时的 Css 3 动画

转载 作者:行者123 更新时间:2023-11-28 12:08:34 25 4
gpt4 key购买 nike

当页面上的所有内容都已加载时,如何让我的页面像这样加载?示例:http://www.creabox.es/themes/verde/index_images.php

我的代码:

#h1count {opacity: 0;
transition: opacity .25s ease-in-out;
-moz-transition: opacity .25s ease-in-out;
-webkit-transition: opacity .25s ease-in-out;
}



#h1count {
font-family: 'League Gothic';
src: url( 'leaguegothic-regular-webfont.eot');
src: url('leaguegothic-regular-webfont.eot?#iefix') format('embedded-opentype'),
url('leaguegothic-regular-webfont.woff') format('woff'),
url('leaguegothic-regular-webfont.ttf') format('truetype'),
url('leaguegothic-regular-webfont.svg#league_gothicregular') format('svg');
font-weight: normal;
font-style: normal;
font-size:70px;
line-height:70px;
opacity: 1;

最佳答案

最简单的办法就是把Animation放在类里,然后写在css里

例如

.animation {
animation: anim-1 0.2s ...
-webkit-animation: anim-1 ...
}

并通过库或插件通过 Javascript 控制 html 元素的加载 ...那里有很多

或者您可以使用 JQuery 方法 $(element).load(function(){}

并确保所有内容都已加载

您可以使用 $(window).load(function(){} 加载整个页面,然后将动画类添加到您的元素

所以动画会在页面加载后运行

关于页面加载时的 Css 3 动画,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19609848/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com