選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

demo.html 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>WOW</title>
  6. <link rel="stylesheet" href="css/libs/animate.css">
  7. <link rel="stylesheet" href="css/site.css">
  8. <style>
  9. .wow:first-child {
  10. visibility: hidden;
  11. }
  12. </style>
  13. <!--[if IE]>
  14. <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  15. <![endif]-->
  16. </head>
  17. <body>
  18. <div id="container">
  19. <header>
  20. <h1>WOW.js</h1>
  21. </header>
  22. <div id="main">
  23. <section class="wow fadeInDown" style="background-color: #f1c40f;"></section>
  24. <section class="wow pulse" style="background-color: #e74c3c;" data-wow-iteration="infinite" data-wow-duration="1500ms"></section>
  25. <section class="section--purple wow slideInRight" data-wow-delay="2s"></section>
  26. <section class="section--blue wow bounceInLeft" data-wow-offset="300"></section>
  27. <section class="section--green wow slideInLeft" data-wow-duration="4s"></section>
  28. <button id="moar">LOAD MOAR!!</button>
  29. </div>
  30. </div>
  31. <script src="dist/wow.js"></script>
  32. <script>
  33. wow = new WOW(
  34. {
  35. animateClass: 'animated',
  36. offset: 100,
  37. callback: function(box) {
  38. console.log("WOW: animating <" + box.tagName.toLowerCase() + ">")
  39. }
  40. }
  41. );
  42. wow.init();
  43. document.getElementById('moar').onclick = function() {
  44. var section = document.createElement('section');
  45. section.className = 'section--purple wow fadeInDown';
  46. this.parentNode.insertBefore(section, this);
  47. };
  48. </script>
  49. </body>
  50. </html>