页面加载时的Css 3动画

页面加载时的Css 3动画,css,Css,当页面上的所有内容都已加载时,如何让我的页面像这样加载? 例如: 我的代码: #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';

当页面上的所有内容都已加载时,如何让我的页面像这样加载? 例如:

我的代码:

#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;

最简单的解决方案是将动画放在类中并在css中编写

比如说

.animation {
   animation: anim-1 0.2s ...
   -webkit-animation: anim-1 ...
}
并通过库或插件通过Javascript控制html元素的加载。。。 外面有很多

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

确保所有东西都装上了

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


因此,动画将在页面加载后运行

Don't。该网站没有JavaScript,并且任何类型的启动屏幕都不好。