<link rel="stylesheet" href="js/pilpil/css/pilpil.min.css">
<script src="js/pilpil/js/pilpil.min.js"></script>
pilpil插件不需要任何脚本初始化,引入库文件后,剩下的只需要在HTML中使用特定样式声明一下就可以了,示例如下:
<figure class="graf-figure">
<div class="aspectRatioPlaceholder">
<div class="aspectRatioPlaceholder-fill"></div>
<div class="progressiveMedia" data-width="2000" data-height="1333">
<img class="progressiveMedia-thumbnail" src="images/small3-30x24.jpg" alt="" />
<canvas class="progressiveMedia-canvas"></canvas>
<img class="progressiveMedia-image" data-src="images/big3-1926x1080.jpg" alt="" />
</div>
</div>
</figure>
the end