支持键盘控制的左右切换立体式图片轮播效果
XML/HTML Code
- <div id="wrapper">
- <div id="slider-one">
- <div> <img src="images/img1.jpg" />
- <p> one hundred<br />
- </p>
- </div>
- <div> <img src="images/img2.jpg" />
- <p> math problem<br />
- </p>
- </div>
- <div> <img src="images/img3.jpg" />
- <p> better than i deserve<br />
- </p>
- </div>
- <div> <img src="images/img4.jpg" />
- <p> seven days a week<br />
- </p>
- </div>
- <div> <img src="images/img5.jpg" />
- <p> path to nowhere<br />
- </p>
- </div>
- <div> <img src="images/img6.jpg" />
- <p> and then i woke up<br />
- </p>
- </div>
- <div> <img src="images/img7.jpg" />
- <p> it's about time<br />
- </p>
- </div>
- <div> <img src="images/img8.jpg" />
- <p> two are better than one<br />
- </p>
- </div>
- <div> <img src="images/img9.jpg" />
- <p> lowercase<br />
- </p>
- </div>
- </div>
- </div>
JavaScript Code
- <script>
- $(document).ready(function () {
- $("a.pop1").fancybox();
- $("a.pop2").fancybox({
- 'overlayShow': false,
- 'transitionIn': 'elastic',
- 'transitionOut': 'elastic'
- });
- $("a.pop3").fancybox({
- 'transitionIn': 'none',
- 'transitionOut': 'none',
- 'overlayColor': '#000',
- 'overlayOpacity': 0.7
- });
- $("a.pop4").fancybox({
- 'opacity': true,
- 'overlayShow': false,
- 'transitionIn': 'elastic',
- 'transitionOut': 'none'
- });
- $("a.pop5").fancybox();
- $("a#example6").fancybox({
- 'titlePosition': 'outside',
- 'overlayColor': '#000',
- 'overlayOpacity': 0.9
- });
- $("a.pop6").fancybox({
- 'titlePosition': 'inside'
- });
- $("a.pop7").fancybox({
- 'titlePosition': 'over'
- });
- });
- </script>
原文地址:http://www.freejs.net/article_jiaodiantu_398.html