我正在使用Lazysizes + lightGallery加载图像。但是,当打开弹出窗口时,[src]也发生了改变
这是配置js Lazysizes:
window.lazySizesConfig = window.lazySizesConfig || {};
window.lazySizesConfig.init = false;
window.lazySizesConfig.loadMode = 1;
window.lazySizesConfig.expand = 0;
window.lazySizesConfig.expFactor = 1.4;
window.lazySizesConfig.hFac = 0.4;
window.addEventListener("load", function() {
lazySizes.init();
});
这是HTML:
<img width="500" height="500" class="asi-img lazyload" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mO8XA8AAisBVHpjGM0AAAAASUVORK5CYII=" data-src="src.jpg" ">
这是HTML加载完成:
<img width="500" height="500" class="asi-img lazyloaded" src="src.jpg" data-src="src.jpg" alt="padagirlss" style="width: 204px; height: 205px; margin-left: -102px; margin-top: -102.5px;">
这是HTML,当打开弹出窗口时:
<img width="500" height="500" class="asi-img lazyloaded" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mO8XA8AAisBVHpjGM0AAAAASUVORK5CYII=" data-src="src.jpg" alt="padagirlss" style="width: 205px; height: 205px; margin-left: -102.5px; margin-top: -102.5px;">
请帮助我!
非常感谢。