The previous version uses the left and right buttons to rotate images. In this version, you can drag the mouse in the window and move the image between the left and right.
The key point is to select a proper value so that when you drag the mouse, all images can be displayed, but do not slide too fast or leave the window.
Not to mention, directly contribute the source code.
<Style> IMG {position: absolute; top: 200; left: 400px;/* border: 1px solid #333; */padding: 2px 5px 2px 5px;-WebKit-transition: returns all 0.7 s;-WebKit-transform-origin: 50% 50% 600px;/* Background: rgba (, 0, 0 ,. 3); */width: 100px; Height: 100px; Z-index:-1 ;}. layerhidden {position: absolute; top: 220px; width: 180px; Height: 200px; Background: white; Vertical-align: middle; text-align: center; Z-index: 1 ;}. layerleft {left: 0px ;}. layerright {left: 850px ;}</style> <SCRIPT> var IMGs; var leftstart = 0; var showlength = 7; var step = 0; var mousedown = false; vaR xstart = 0; var ydegs; window. onmousedown = function (EV) {mousedown = true; var E = event | window. event; xstart = E. clientx;} window. onmouseup = function (EV) {mousedown = false;} window. onmousemove = function (EV) {If (mousedown = true) {var E = event | window. event; var xtest = 500; var ydeg = (E. clientx-xstart)/1024*10; // select 50 to display all the images. If (ydeg> = 0 & ydegs [IMGs. length-1]>-50) | (ydeg <0 & ydegs [0] <50) {for (VAR I = 0; I <Div class = "layerhidden layerleft"> </div> <Div class = "layerhidden layerright"> </div> <SCRIPT> Init (); </SCRIPT>
Disclaimer: all source code is original. You are welcome to discuss it. If you use it directly, please indicate the source code in the source code.
3D wheel placement for images (V2.0): move the mouse to display images