Home > Web Front-end > JS Tutorial > A fun piece of JavaScript code_Typical special effects

A fun piece of JavaScript code_Typical special effects

WBOY
Release: 2016-05-16 19:23:43
Original
1840 people have browsed it

The effect of changing pictures on the webpage
You can see the effect by directly pasting it into the browser address bar and running it
Remember to open a page with many pictures first

Copy code The code is as follows:

javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i- DIL; i ){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=Math.sin(R*x1 i*x2 x3)*x4 x5; DIS.top=Math.cos( R*y1 i*y2 y3)*y4 y5}R }setInterval('A()',5); void(0);

The effect is not bad, use your brain, browser address Bars can achieve many effects
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template