Front-End Lazy loading

Source: Internet
Author: User

An integrated

Because of my code cloud too much too messy, so decided to a one of the integration into a springboot project inside.

Attach your own GitHub project address Https://github.com/247292980/spring-boot

Attach the Summary blog address https://www.cnblogs.com/ydymz/p/9391653.html

To integrate functionality

Spring-boot,fusionchart,thymeleaf,vue,shardingjdbc,mybatis-generator, share authorization, DROOLS,SPRING-SECURITY,SPRING-JPA, Webjars,aspect,drools-drt,rabbitmq,zookeeper,mongodb,mysql Stored Procedures

This time, we're going to integrate the front-end delay loading

Two

It used to be a jquery lazyload, but not all of them are JQ? So, I Baidu a light weight remember lazy load pack

However, Baidu's front-end quality ....

Below is the least code to implement lazy loading

Three codes
<!DOCTYPE HTML><HTML><Head>    <title>Hello world!</title></Head><Body><a>Easy Thymeleaf</a><imgclass=""src= "Images/loading.gif"Data-echo= "Images/big.jpg"><!--In addition, they set the div outside the IMG to add a class, and IMG also has a class, and then according to the two class to write CSS, modify the src what, and then said that the SRC default is Blank.gif or loading.gif .... But the study, this is because they do not understand the meaning of what SRC means of course the most likely is that he copied the code did not think so much ... This is the most normal situation . -<!--SRC is the image before lazy loading, mostly empty or loading. Baidu first said that the two images plug-in with .... But even if he is wrong, basic seconds know how to change ... data-echo is lazy loaded after the picture -</Body><Scriptsrc= "Js/echo.js"></Script><Script>echo.init ({offset:0,//picture of how many pixels from the viewable area can be loadedThrottle: + //picture delay How many milliseconds to load    });</Script></HTML>
Four pictures

Front-End Lazy loading

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.