This new lazy loading API come down to a simple loading=”lazy” attribute and value on img tags:
<img src=”path/to/logo.png” loading=”lazy”>
To experiment with this new API, you can add an onLoad attribute to the image:
<img src=”path/to/logo.png” loading=”lazy” onload=”alert(‘Loaded!’);”>
When the user scrolls within range of the image, the download and render is triggered. There are three values for this…
This is only a snippet of a Website Design Article written by David Walsh
Read Full Article
This Content is Generated from RSS Feeds, if your content is featured and you would like to be removed, please Contact Us With your website address and name of site you wish to be removed from.
You can control what content is distributed in your RSS Feed by using your Website Editor.