3d Rotation instance

Source: Internet
Author: User

1<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">234<link rel= "stylesheet" type= "Text/css" href= "Style.css"/>5<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 "/>6<title> Untitled Document </title>7<script>8Window.onload=function ()9{//Drag the virtual point rotation, the virtual point does not set the Y point, because you do not want to be on the Y axis also motionTen     varX=lastx=0; One     varIspeed=0; A     varTimer=NULL; -     varOimg=document.getelementbyid ("Img1"); -     varAimg=document.getelementsbytagname (' img '); the     varolastimg=oimg;//The flag shows the current IMG -     //Picture Optimization Performance -      for(vari=0; i<77; i++) { -                 //(FN (param)) (sparam); +(function(onewimg) { -             varoimgs=NewImage (); +             //var onewimg=document.createelement (' img '); AOimgs.onload=function() { atOnewimg.src= This. Src;  -             }; -Oimgs.src= ' Img/miaov (' +i+ '). jpg '; -Onewimg.style.display= ' None '; - Document.body.appendChild (ONEWIMG);  -}) (Document.createelement (' img ')); in     } -      todocument.onmousedown=function(EV) { + clearinterval (timer); -         varoevent=ev| |event; the         vardisx=oevent.clientx-x;  *Document.onmousemove=function(EV) { $oevent=ev| |event;Panax Notoginsengx=oevent.clientx-Disx; - move (); theispeed=x-Lastx; +lastx=x; A             //oimg.src= ' Img/miaov (' +l+ '). jpg '; the             return false;//resolve default events for IE +         };  -document.onmouseup=function() { $Document.onmousemove=NULL; $document.onmouseup=NULL; -Timer=setinterval (function(){                 -x+=Ispeed; the move ();  -}, 30);Wuyi         }; the          -         functionMove () { Wu             if(ispeed>0) -ispeed--; About             Else  $ispeed++; -             varL=parseint (-X/10); -             //Drag 10 pixels to rotate the picture -             if(ispeed==0) { A clearinterval (timer); +             }                         the             if(l>0) -L=l%77; $             Else  theL=l+math.floor (L/77) *77* (-1); the             //Picture Optimization Performance the             if(olastimg!=Aimg[l]) { theOlastimg.style.display= ' None '; -Aimg[l].style.display= ' Block '; inolastimg=Aimg[l]; the             }     the         } About         return false;//Disable default event ff/chrome support, IE does not support the     }; the }; the</script> + -  the<body>Bayi the<!--<div id= "BG" ></div> the<div id= "PROG" > -360-degree panoramic display loading in ......<span>0%</span> -<div id= "Bar" ></div> the</div>--> the</body> the

3d Rotation instance

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.