This article describes how to automatically collapse the advertisement code for displaying a small graph after displaying a large graph in javascript. It involves operations on the element attributes of javascript pages and mathematical operation techniques. It has some reference value, for more information about how to use JavaScript to display a large image, see the example in this article. Share it with you for your reference. The details are as follows:
This is a very good JavaScript image effect. When you first open a webpage, a large image is displayed, just like a screen-masking advertisement. After a while, the image is automatically collapsed slowly, at this time, JavaScript controls the change of advertising images, which are always displayed on the top of the webpage. We often see this effect on some large portal websites. I personally feel pretty cool!
Let's take a look at the running effect:
The Online Demo address is as follows:
Http://demo.jb51.net/js/2015/js-big-to-small-pic-adv-codes/
The Code is as follows:
Display the big image first and then automatically collapse the JS advertisement that displays the small image.