This js special effect is implemented using a JS framework Aui-core. Aui-core is currently a test version, which adds CSS3 elements, therefore, do not use the IE browser to run the Internet browsing time. To make the Internet users see the final effect, use Google, Firefox, and other browsing methods to open the sport. If you don't talk about it, let's take a look at the effect first.
Corrected the following:
1. changed to the object-oriented method.
2. Fixed the flash BUG.
3. 360 degrees of Rotation
4. Scroll the mouse to switch the view
The main code is as follows:
OImg. bind ("mousedown", function () {oDoc. mousemove (function (e) {var mouseX = e. clientX, // continue mouseY = e. clientY, val = tmp-mouseX; if (val> 50) {_ IDX + = 1; transform (oCon [0], "rotateY (" + (_ IDX * deg) + "deg)");} else if (val <-50) {_ IDX-= 1; transform (oCon [0], "rotateY (" + (_ IDX * deg) + "deg)") ;}; tmp = mouseX; return false ;}); oDoc. mouseup (function () {tmp = 0; this. onmousemove = null; this. onmouseup = null ;}); return false ;});
The effect is as follows:
Source: http://www.jq-school.com/Detail.aspx? Id = 130