demo_transition_gallery.html 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset=utf-8 />
  5. <title>Flux Slider Demo &#0187; Hardware accelerated image transitions using CSS3</title>
  6. <!--[if lte IE 8]>
  7. <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  8. <![endif]-->
  9. <link rel="stylesheet" href="css/demo.css" type="text/css" media="screen" title="no title" charset="utf-8">
  10. <!-- Use Zepto for best performance on WebKit based browser -->
  11. <!-- <script src="js/zepto/zepto.js" type="text/javascript" charset="utf-8"></script> -->
  12. <!-- Use jQuery for best compatibility with other CSS3 enabled browsers -->
  13. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript" charset="utf-8"></script>
  14. <script src="js/flux.min.js" type="text/javascript" charset="utf-8"></script>
  15. <script type="text/javascript" charset="utf-8">
  16. $(function(){
  17. if(!flux.browser.supportsTransitions)
  18. alert("Flux Slider requires a browser that supports CSS3 transitions");
  19. window.f = new flux.slider('#slider', {
  20. autoplay: false,
  21. pagination: false
  22. });
  23. // Setup a listener for user requested transitions
  24. $('div#transitions').bind('click', function(event){
  25. event.preventDefault();
  26. // If this is a 3D transform and the browser doesn't support 3D then inform the user
  27. if($(event.target).closest('ul').is('ul#trans3d') && !flux.browser.supports3d)
  28. {
  29. alert("The '"+event.target.innerHTML+"' transition requires a browser that supports 3D transforms");
  30. return;
  31. }
  32. window.f.next(event.target.href.split('#')[1]);
  33. });
  34. });
  35. </script>
  36. </head>
  37. <body id="transitiongallery">
  38. <section class="container">
  39. <h1><span class="flux">Flux</span> <span class="slider">Slider</span></h1>
  40. <h2>Hardware accelerated image transitions using CSS3.</h2>
  41. <div id="slidercontainer">
  42. <div id="slider">
  43. <img src="img/avatar.jpg" alt="" />
  44. <img src="img/ironman.jpg" alt="" />
  45. <img src="img/tron.jpg" alt="" />
  46. <img src="img/greenhornet.jpg" alt="" />
  47. </div>
  48. <div id="transitions">
  49. <h2>2D Transitions</h2>
  50. <ul id="trans2D">
  51. <li><a href="#bars">Bars</a></li>
  52. <li><a href="#zip">Zip</a></li>
  53. <li><a href="#blinds">Blinds</a></li>
  54. <li><a href="#blocks">Blocks</a></li>
  55. <li><a href="#concentric">Concentric</a></li>
  56. <li><a href="#warp">Warp</a></li>
  57. <li><a href="#slide">Slide</a></li>
  58. </ul>
  59. <h2>3D Transitions</h2>
  60. <ul id="trans3d">
  61. <li><a href="#bars3d">Bars3D</a></li>
  62. <li><a href="#cube">Cube</a></li>
  63. <li><a href="#tiles3d" class="new">Tiles3D</a></li>
  64. <li><a href="#blinds3d" class="new">Blinds3D</a></li>
  65. <li><a href="#turn" class="new">Turn</a></li>
  66. </ul>
  67. </div>
  68. </div>
  69. <footer>
  70. <p>Flux Slider &copy; Copyright 2011 Joe Lambert. All Rights Reserved. Follow me on Twitter <a href="http://www.twitter.com/joelambert">@joelambert</a></p>
  71. <img src="img/html5.png" alt="HTML5" width="35px" />
  72. </footer>
  73. </section>
  74. </body>
  75. </html>