davidhirtz/yii2-lazysizes
最新稳定版本:v2.3.0
Composer 安装命令:
composer require davidhirtz/yii2-lazysizes
包简介
High performance and SEO friendly lazy loader for images (responsive and normal), iframes and more, that detects any visibility changes triggered through user interaction, CSS or JavaScript without configuration.
关键字:
README 文档
README
lazysizes is a fast (jank-free), SEO-friendly and self-initializing lazyloader for images (including responsive images picture/srcset), iframes, scripts/widgets and much more.
Installation
The preferred way to install this extension is through composer.
php composer.phar require --prefer-dist davidhirtz/yii2-lazysizes "*"
Usage
Once the extension is installed, simply use it in your views. The following example shows you how to add an lazysizes powered image tag.
\davidhirtz\yii2\lazysizes\AssetBundle::register($this); echo \davidhirtz\yii2\lazysizes\Html::lazyImg($srcset, $options);
Upgrade from V1
Important: AssetBundle is no longer registered by calling Html::lazyImg().
统计信息
- 总下载量: 1.46k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-02-24