492 lines
18 KiB
HTML
492 lines
18 KiB
HTML
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head lang="en">
|
||
|
<meta charset="UTF-8" />
|
||
|
<title>
|
||
|
Images with srcset without sizes - Lazyload demos
|
||
|
</title>
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||
|
<style>
|
||
|
ul,
|
||
|
li {
|
||
|
list-style-type: none;
|
||
|
margin: 0;
|
||
|
padding: 0;
|
||
|
}
|
||
|
|
||
|
li {
|
||
|
min-height: 280px;
|
||
|
}
|
||
|
|
||
|
a,
|
||
|
img {
|
||
|
display: block;
|
||
|
}
|
||
|
|
||
|
img {
|
||
|
border: 0;
|
||
|
width: 220px;
|
||
|
height: 280px;
|
||
|
}
|
||
|
|
||
|
img:not([src]):not([srcset]) {
|
||
|
visibility: hidden;
|
||
|
}
|
||
|
</style>
|
||
|
</head>
|
||
|
<body>
|
||
|
<h1>Images with srcset without sizes demo</h1>
|
||
|
<div id="results1" class="results">
|
||
|
<ul>
|
||
|
<li>
|
||
|
<a href="#/it/donna/stivaletti_cod44721746jj.html">
|
||
|
<img
|
||
|
alt="Stivaletti"
|
||
|
src="https://via.placeholder.com/440x560?text=Img+01"
|
||
|
srcset="
|
||
|
https://via.placeholder.com/220x280?text=Img+01 1x,
|
||
|
https://via.placeholder.com/440x560?text=Img+01 2x
|
||
|
"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/open-toe_cod44740806jx.html">
|
||
|
<img
|
||
|
alt="Open toe"
|
||
|
src="https://via.placeholder.com/440x560?text=Img+02"
|
||
|
srcset="
|
||
|
https://via.placeholder.com/220x280?text=Img+02 1x,
|
||
|
https://via.placeholder.com/440x560?text=Img+02 2x
|
||
|
"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/sneakers-tennis-shoes-basse_cod44735977gr.html">
|
||
|
<img
|
||
|
alt="Sneakers & Tennis"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+03"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+03 1x, https://via.placeholder.com/440x560?text=Img+03 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/sneakers-tennis-shoes-basse_cod44738717am.html">
|
||
|
<img
|
||
|
alt="Sneakers & Tennis shoes basse"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+04"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+04 1x, https://via.placeholder.com/440x560?text=Img+04 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/sneakers-tennis-shoes-alte_cod44739940cb.html">
|
||
|
<img
|
||
|
alt="Sneakers & Tennis shoes alte"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+05"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+05 1x, https://via.placeholder.com/440x560?text=Img+05 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/sneakers-tennis-shoes-alte_cod44740860xg.html">
|
||
|
<img
|
||
|
alt="Sneakers & Tennis shoes alte"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+06"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+06 1x, https://via.placeholder.com/440x560?text=Img+06 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/sneakers-tennis-shoes-basse_cod44738719vn.html">
|
||
|
<img
|
||
|
alt="Sneakers & Tennis shoes basse"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+07"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+07 1x, https://via.placeholder.com/440x560?text=Img+07 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/sneakers-tennis-shoes-basse_cod44739938wk.html">
|
||
|
<img
|
||
|
alt="Sneakers & Tennis shoes basse"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+08"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+08 1x, https://via.placeholder.com/440x560?text=Img+08 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/stivali_cod44736534fq.html">
|
||
|
<img
|
||
|
alt="Stivali"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+09"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+09 1x, https://via.placeholder.com/440x560?text=Img+09 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/stivali_cod44735388ui.html">
|
||
|
<img
|
||
|
alt="Stivali"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+10"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+10 1x, https://via.placeholder.com/440x560?text=Img+10 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/stivaletti_cod44739165ev.html">
|
||
|
<img
|
||
|
alt="Stivaletti"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+11"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+11 1x, https://via.placeholder.com/440x560?text=Img+11 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/stivaletti_cod44739454hf.html">
|
||
|
<img
|
||
|
alt="Stivaletti"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+12"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+12 1x, https://via.placeholder.com/440x560?text=Img+12 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/stivali_cod44719480km.html">
|
||
|
<img
|
||
|
alt="Stivali"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+13"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+13 1x, https://via.placeholder.com/440x560?text=Img+13 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/stivaletti_cod44719687td.html">
|
||
|
<img
|
||
|
alt="Stivaletti"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+14"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+14 1x, https://via.placeholder.com/440x560?text=Img+14 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/decollete_cod44721899ng.html">
|
||
|
<img
|
||
|
alt="Décolleté"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+15"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+15 1x, https://via.placeholder.com/440x560?text=Img+15 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/mocassini_cod44721744sl.html">
|
||
|
<img
|
||
|
alt="Mocassini"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+16"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+16 1x, https://via.placeholder.com/440x560?text=Img+16 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/stivaletti_cod44716730kr.html">
|
||
|
<img
|
||
|
alt="Stivaletti"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+17"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+17 1x, https://via.placeholder.com/440x560?text=Img+17 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/decollete_cod44718734xl.html">
|
||
|
<img
|
||
|
alt="Décolleté"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+18"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+18 1x, https://via.placeholder.com/440x560?text=Img+18 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/decollete_cod44721796uk.html">
|
||
|
<img
|
||
|
alt="Décolleté"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+19"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+19 1x, https://via.placeholder.com/440x560?text=Img+19 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/francesine_cod44717679mj.html">
|
||
|
<img
|
||
|
alt="Francesine"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+20"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+20 1x, https://via.placeholder.com/440x560?text=Img+20 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/stivaletti_cod44724594vu.html">
|
||
|
<img
|
||
|
alt="Stivaletti"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+21"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+21 1x, https://via.placeholder.com/440x560?text=Img+21 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/decollete_cod44726148aq.html">
|
||
|
<img
|
||
|
alt="Décolleté"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+22"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+22 1x, https://via.placeholder.com/440x560?text=Img+22 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/mocassini_cod44719629nt.html">
|
||
|
<img
|
||
|
alt="Mocassini"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+23"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+23 1x, https://via.placeholder.com/440x560?text=Img+23 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/mocassini_cod44725329kq.html">
|
||
|
<img
|
||
|
alt="Mocassini"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+24"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+24 1x, https://via.placeholder.com/440x560?text=Img+24 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/stivali_cod44724026qs.html">
|
||
|
<img
|
||
|
alt="Stivali"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+25"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+25 1x, https://via.placeholder.com/440x560?text=Img+25 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/stivaletti_cod44720256gw.html">
|
||
|
<img
|
||
|
alt="Stivaletti"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+26"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+26 1x, https://via.placeholder.com/440x560?text=Img+26 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/stivaletti_cod44722062id.html">
|
||
|
<img
|
||
|
alt="Stivaletti"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+27"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+27 1x, https://via.placeholder.com/440x560?text=Img+27 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/mocassini_cod44722402rh.html">
|
||
|
<img
|
||
|
alt="Mocassini"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+28"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+28 1x, https://via.placeholder.com/440x560?text=Img+28 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/stivaletti_cod44726296vu.html">
|
||
|
<img
|
||
|
alt="Stivaletti"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+29"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+29 1x, https://via.placeholder.com/440x560?text=Img+29 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/stivaletti_cod44725755ct.html">
|
||
|
<img
|
||
|
alt="Stivaletti"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+30"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+30 1x, https://via.placeholder.com/440x560?text=Img+30 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/stivaletti_cod44725348nv.html">
|
||
|
<img
|
||
|
alt="Stivaletti"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+31"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+31 1x, https://via.placeholder.com/440x560?text=Img+31 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/stivaletti_cod44721879xx.html">
|
||
|
<img
|
||
|
alt="Stivaletti"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+32"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+32 1x, https://via.placeholder.com/440x560?text=Img+32 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/cuissardes_cod44729472iq.html">
|
||
|
<img
|
||
|
alt="Cuissardes"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+33"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+33 1x, https://via.placeholder.com/440x560?text=Img+33 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/decollete_cod44725388jv.html">
|
||
|
<img
|
||
|
alt="Décolleté"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+34"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+34 1x, https://via.placeholder.com/440x560?text=Img+34 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/stivaletti_cod44721854ce.html">
|
||
|
<img
|
||
|
alt="Stivaletti"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+35"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+35 1x, https://via.placeholder.com/440x560?text=Img+35 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/sneakers-tennis-shoes-basse_cod44727690jp.html">
|
||
|
<img
|
||
|
alt="Sneakers & Tennis shoes basse"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+36"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+36 1x, https://via.placeholder.com/440x560?text=Img+36 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/mocassini_cod44727501hh.html">
|
||
|
<img
|
||
|
alt="Mocassini"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+37"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+37 1x, https://via.placeholder.com/440x560?text=Img+37 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/sneakers-tennis-shoes-basse_cod44727038aq.html">
|
||
|
<img
|
||
|
alt="Sneakers & Tennis shoes basse"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+38"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+38 1x, https://via.placeholder.com/440x560?text=Img+38 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/mocassini_cod44704882bq.html">
|
||
|
<img
|
||
|
alt="Mocassini"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+39"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+39 1x, https://via.placeholder.com/440x560?text=Img+39 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="#/it/donna/mocassini_cod44734002vc.html">
|
||
|
<img
|
||
|
alt="Mocassini"
|
||
|
class="lazy"
|
||
|
data-src="https://via.placeholder.com/440x560?text=Img+40"
|
||
|
data-srcset="https://via.placeholder.com/220x280?text=Img+40 1x, https://via.placeholder.com/440x560?text=Img+40 2x"
|
||
|
/>
|
||
|
</a>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<script src="../dist/lazyload.min.js"></script>
|
||
|
<script>
|
||
|
(function () {
|
||
|
function logElementEvent(eventName, element) {
|
||
|
console.log(Date.now(), eventName, element.getAttribute("data-src"));
|
||
|
}
|
||
|
|
||
|
var callback_enter = function (element) {
|
||
|
logElementEvent("🔑 ENTERED", element);
|
||
|
};
|
||
|
var callback_exit = function (element) {
|
||
|
logElementEvent("🚪 EXITED", element);
|
||
|
};
|
||
|
var callback_loading = function (element) {
|
||
|
logElementEvent("⌚ LOADING", element);
|
||
|
};
|
||
|
var callback_loaded = function (element) {
|
||
|
logElementEvent("👍 LOADED", element);
|
||
|
};
|
||
|
var callback_error = function (element) {
|
||
|
logElementEvent("💀 ERROR", element);
|
||
|
element.src =
|
||
|
"https://via.placeholder.com/440x560/?text=Error+Placeholder";
|
||
|
};
|
||
|
var callback_finish = function () {
|
||
|
logElementEvent("✔️ FINISHED", document.documentElement);
|
||
|
};
|
||
|
var callback_cancel = function (element) {
|
||
|
logElementEvent("🔥 CANCEL", element);
|
||
|
};
|
||
|
|
||
|
ll = new LazyLoad({
|
||
|
// Assign the callbacks defined above
|
||
|
callback_enter: callback_enter,
|
||
|
callback_exit: callback_exit,
|
||
|
callback_cancel: callback_cancel,
|
||
|
callback_loading: callback_loading,
|
||
|
callback_loaded: callback_loaded,
|
||
|
callback_error: callback_error,
|
||
|
callback_finish: callback_finish
|
||
|
});
|
||
|
})();
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|