programmieren:php:snippets:lazy_load
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
| programmieren:php:snippets:lazy_load [13/10/2019 13:25] – conny | programmieren:php:snippets:lazy_load [Unbekanntes Datum] (aktuell) – Externe Bearbeitung (Unbekanntes Datum) 127.0.0.1 | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| ==== Lazy Load ==== | ==== Lazy Load ==== | ||
| - | \\ | + | |
| nachladen von Grafiken welche außerhalb des sichtbaren Bereichs sind.\\ | nachladen von Grafiken welche außerhalb des sichtbaren Bereichs sind.\\ | ||
| \\ | \\ | ||
| Zeile 7: | Zeile 7: | ||
| JTL Forum:\\ | JTL Forum:\\ | ||
| https:// | https:// | ||
| + | \\ | ||
| + | http:// | ||
| <code html> | <code html> | ||
| - | < | + | < |
| + | < | ||
| + | <img class=" | ||
| + | <img class=" | ||
| + | <img class=" | ||
| + | <img class=" | ||
| </ | </ | ||
| - | <code js> | + | <code js> |
| + | // plugin build-in placeholder management | ||
| $(function() { | $(function() { | ||
| - | $(" | + | $('.lazy').lazy({ |
| - | | + | placeholder: |
| - | < | + | |
| }); | }); | ||
| }); | }); | ||
| </ | </ | ||
| + | |||
| + | <code css> | ||
| + | img.lazy { | ||
| + | width: 700px; | ||
| + | height: 467px; | ||
| + | display: block; | ||
| + | | ||
| + | /* optional way, set loading as background */ | ||
| + | background-image: | ||
| + | background-repeat: | ||
| + | background-position: | ||
| + | } | ||
| + | </ | ||
programmieren/php/snippets/lazy_load.1570965939.txt.gz · Zuletzt geändert: 13/10/2019 12:25 (Externe Bearbeitung)
