Javascript slides (360-degree panoramic images) _ form Effects

Source: Internet
Author: User
This article mainly introduces how to use javascript to create slides (360-degree panoramic images). Slides are often used during product demonstrations, here I have compiled a very good 360-degree panoramic slide implementation tutorial for you. If you need a slide, you can refer to the slides that are frequently used for product demonstration, with a panoramic image of 360 degrees, you can enjoy a good user experience. Here we will introduce you to a 360 panoramic magic lamp implementation tutorial from Robert Pataki. This tutorial uses js to implement a cool panoramic magic lamp. The details are as follows:

No plug-ins are used in this tutorial. We will use HTML, css, and javascript. Of course, jQuery is also used!

How to implement it?

We will use the images generated in advance according to 360 for carousel to achieve the animation display effect. It contains 180 images. Therefore, the loading time may be relatively long.

Code Implementation

We will add media queries to the css code so that this effect can be achieved on both ipad and iphone.

1. Code File

Add js, css, and image directory. The CSS directory contains reset.css. Js contains jQuery. The code file is as follows:

2. New Project

Create an HTML file index.html. InWe have set the viewport of the mobile device so that the content cannot be scaled. Add two files

Reset.cssand threesixty.css. Contains custom css styles.

 
  
   
    360
    
    
   
  
 

3. Load progress bar

Create

To hold the slides. Contains

    Used to contain Image Sequences
  1. It also contains a progress bar. We will use javascript to dynamically load images.

       
        
         
          360
          
          
          
           
            0%
            


4. Add Interaction

At the end of the code, we added jQuery to process interaction, and threesixity. js to process image slides.

 
  
   
    360
    
    
    
     
      0%
      

《script》 《script》 《script》

5. Style

We need the threesixty.css file. Reset.css is used to set the default style. First define # threesixty packaging. The default image Phantom is 960x450. Center horizontally and vertically.

#threesixty {position:absolute;overflow:hidden;top:50%;left:50%;width:960px;height:540px;margin-left:-480px;margin-top:-270p

The above content is all about using javascript to make slides. I hope you will like 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.