- Online Demo 1
- Local Downloads
All code See original link: http://www.gbtags.com/gb/share/5799.htm
360 degrees of panoramic picture effect can often be used to give customers to do product display, today we recommend a very good from Robert Pataki's 360 Panorama slideshow Implementation Tutorial, this tutorial will use JavaScript to create a cool Panorama slideshow implementation, I'm sure you'll love it!
No plugins are used in this tutorial, we will use HTML,CSS and JavaScript to implement, and of course, the use of the jquery framework!
How is it implemented?
We will use a pre-built image of 360 to make the animation appear as a carousel. Contains 180 images. So the load time may be longer.
Code implementation
We'll add media queries to the CSS code to make this effect available on both the ipad and iphone.
1. code files
We add js,css, picture catalog. The CSS catalog contains the RESET.CSS. JS contains jquery. The code files are as follows:
2. New projects
Create an HTML file index.html. In
Reset.css and Threesixty.css. A custom CSS style is included.
- <! DOCTYPE html>
- lang="en">
- <meta CharSet="Utf-8">
- <meta name="viewport" content="initial-scale=1.0, maximum-scale= 1.0 " />
- <title></title>
- <link rel="stylesheet" href="Css/reset.css" media= "Screen" type="text/css" />
- <link rel="stylesheet" href="Css/threesixty.css" Media= "screen" type="text/css" />
- <body>
- </body>
3. Loading the progress bar
Create a <div> to accommodate the slideshow. It contains a <ol>, which is used to include the picture sequence <li>, and also contains a <span> to display the progress bar. We will use JavaScript to dynamically load images.
- <! DOCTYPE html>
- lang="en">
- <meta CharSet="Utf-8">
- <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0" />
- <title></title>
- <link rel = "stylesheet" href=< Span class= "ATV" > "css/reset.css" media= type=" TEXT/CSS " />
- <link rel="stylesheet" href="Css/threesixty.css" Media= "screen" type="text/css" />
- <body>
- <div id="ThreeSixty">
- <div id="Spinner">
- <span>0%</span>
- </div>
- <ol id="Threesixty_images"></ol>
- </div>
- </body>
4. Add Interaction
At the end of the code, we add jquery to handle the interaction, threesixity.js to handle the picture slide.
- <! DOCTYPE html>
- lang="en">
- <meta CharSet="Utf-8">
- <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0" />
- <title></title>
- <link rel = "stylesheet" href=< Span class= "ATV" > "css/reset.css" media= type=" TEXT/CSS " />
- <link rel="stylesheet" href="Css/threesixty.css" Media= "screen" type="text/css" />
- <body>
- <div id="ThreeSixty">
- <div id="Spinner">
- <span>0%</span>
- </div>
- <ol id="Threesixty_images"></ol>
- </div>
- <script src="Js/heartcode-canvasloader-min.js"></script>
- <script src="Js/jquery-1.7.min.js"></script>
- <script src="Js/threesixty.js"></script>
- </body>
5. Style
We add the Threesixty.css file. The RESET.CSS is used to set the default style. First define the #threesixty wrapper. The default picture slide is 960x450. Horizontally vertically centered.
- #threesixty {
- Position:absolute;
- Overflow:hidden;
- Top:%;
- Left:%;
- Width:960px;
- Height:540px;
- Margin-left:-480px;
- Margin-top:-270px;
- }
- #threesixty_images {
- Display: none;
- }
All code See original link: http://www.gbtags.com/gb/share/5799.htm
Use JavaScript to create a responsive, cool 360-degree panorama view slideshow