In the case of more pages, in order to optimize performance, you can use lazy loading technology, I encapsulated a lightweight plug-in.
Plug - ins:
Http://pan.baidu.com/s/1o6804Gy
How to use:
1 need to introduce ECHO.CSS and echo.min.js in the page
2 for images that require lazy loading, use the following notation:
Blank.gif is a background image that is included in the plugin. The width of the picture must be set, of course, you can use an external style to control the size of multiple images.
The Data-echo points to the real picture address.
3 initialization of the plug-in:
Echo.init ();
as simple as this, you will be able to see that the image is loaded only when it appears in the field of view, reducing the rendering effort of the page.
Description
We know that the jquery lazyloading plugin has been able to do this well, but it is based on jquery and may not be practical for mobile, and this plugin does not rely on any third-party libraries, and the core files are only about 3KB, which is ideal for mobile development.
Solutions for picture lazy loading (for mobile)