1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>3D Image Slider with SpriteSpin</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/spritespin/4.0.0/spritespin.min.css"> <style> body { display: flex; justify-content: center; align-items: center; height: 100vh; background-color: #333; } #spritespin { width: 600px; height: 400px; } </style> </head> <body> <div id="spritespin"></div> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> <script src="https://unpkg.com/spritespin@4.0.3/release/spritespin.js"></script> <script> window.onload = () => { $('#spritespin').spritespin({ source: Array.from({ length: 12 }, (_, i) => `360/2/环物_${i + 1}.jpg`), width: 600, height: 400, frameTime: 60, animate: false, loop: false, stopFrame: 0, sense: -1, wrap: true }); } </script> </body> </html> |