3d wheel placement for images (V2.0): move the mouse to move the images, 3dv2. 0

Source: Internet
Author: User

3d wheel placement for images (V2.0): move the mouse to move the images, 3dv2. 0

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.


Javascript uses the mouse to drag an image on the screen to swap the position between the moving image and the image

Search for jquery draggable

There are still many examples of jquery portal.

Remember, search technology can only trust google

How to merge multiple images into one, and then drag and drop the scroll wheel to view

Ps can be done. Open ps and create a new file with a very high height. The width is moderate, and drag your cartoon into it to set the merge layer and export it.

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.