当页面上的所有内容都加载时,如何让我的页面加载? 例如: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;
答案 0 :(得分:0)
最好的解决方案是将动画放入类中并写入css
例如
.animation {
animation: anim-1 0.2s ...
-webkit-animation: anim-1 ...
}
通过库或插件控制通过Javascript加载html元素...... 那里有很多人
或者你可以使用JQuery Method $(element).load(function(){}
并确保everythi8ng已加载
你可以使用$(window)。load(function(){}来加载整个页面,之后将动画类添加到元素中
所以动画将在页面加载后运行