[wordpress插件] Crazy Lazy疯狂的懒惰

wordpress 插件 文章 2020-04-04 12:50 476 0 全屏看文

AI助手支持GPT4.0

评分
90
描述

Crazy Lazy helps increasing the performance of your blog or website by displaying images efficiently.

Crazy Lazy 通过有效地显示图像来帮助提高博客或网站的性能。

When a page would usually display some images, Crazy Lazy will prevent those images to load.

当页面通常显示一些图像时, Crazy Lazy 将阻止加载这些图像。

Only when a user scrolls down the page and reaches the position where an image actually should be displayed, that particular image will be loaded from the server.

只有当用户向下滚动页面并到达实际应显示图像的位置时,才会从服务器加载该特定图像。

By loading images only when needed, Crazy Lazy will reducing page loading times and (potentially costly) traffic.

通过仅在需要时加载图像, Crazy Lazy 将减少页面加载时间并(可能会增加流量)。

This Lazy Load plugin is structured very lean and does not require any settings: activate, done.

此惰性加载插件的结构非常精简,不需要任何设置:激活,完成。

Depending on the theme or the usage of jQuery Crazy Lazy optionally will utilze a modified version of the jQuery plugin Unveil.js, or the native JavaScript library lazyload.js.<

nofollow“> Unveil.js 或本地JavaScript库 lazyload.js 。<

/p>

/ p>

Styling

样式

Placeholders for images can be styled, i.e. like this:

图像的占位符可以设置样式,例如:

img[src*='data:image/gif;base64'] {    

  img [src * ='data:image / gif; base64'] {    

border: 1px dashed #dbdbdb;

边框:1px虚线#dbdbdb;

}

}

img.crazy_lazy {    

img.crazy_lazy {    

background: url(/wp-includes/images/wpspin-2x.gif) no-repeat center center;    

背景:url(/wp-includes/images/wpspin-2x.gif)无重复中心;    

background-size: 16px 16px;

background-size:16px 16px;

}

}

Excluding images

不包含图片

It’s possible to exclude some images from the lazy loading.

可以从延迟加载中排除一些图像。

This can be achieved by adding an attribute data-crazy-lazy="exclude" to the images that should not lazy loaded by the plugin.

这可以通过将属性 data-crazy-lazy =“ exclude” 添加到不应由插件延迟加载的图像来实现。

Memory Usage

内存使用情况

安装步骤

    • If you don't know how to install a plugin for WordPress, here's how.<

    • 如果您不知道如何为WordPress安装插件,请此处是。<

      /li>

      / li>

下载地址
https://downloads.wordpress.org/plugin/crazy-lazy.1.0.4.zip
-EOF-

AI助手支持GPT4.0