Emerge让网页加载不闪烁,按顺序加载

网页加载如何让页面按顺序加载  不闪烁 Emerge is a page load coordinator. Normally, when a web page loads, elements appear in random order, causing unpleasant flashing. With WP网站建设

网页加载如何让页面按顺序加载  不闪烁

Emerge is a page load coordinator.

Normally, when a web page loads, elements appear in random order, causing unpleasant flashing. With Emerge, you have fine control over this:

Without Emerge

With Emerge (click demo to replay)

网站建设

网站建设

With Emerge, you don’t write Javascript. Instead, you specify the desired behavior declaratively. This includes order, timing, loading indicators and particular animations.

New in version 1.3

Video support, emerge-replay to replay animations.

Setup and basic usage

Add the following to the <head> of your page:

<script src="/path/to/jquery.js"></script>
<script src="/path/to/emerge.js"></script>

Now any element with class="emerge" will fade in after its contents are loaded:

<div class="emerge">
... Show this only when it is ready ...
</div>

Emerge takes care of all <img /> tags and images used in CSS (backgrounds, list-style-images and so on), as well as videos inserted with the <video /> tag.

 

See the documentation for detail.

 

http://ilyabirman.net/projects/emerge/   详细效果超好看页面

原创文章,作者:网站建设,如若转载,请注明出处:https://www.davidwu.net/archives/7564

发表评论

电子邮件地址不会被公开。 必填项已用*标注