JQuery 圖片自動切換效果(淡入淡出)

JQuery 圖片自動切換效果(淡入淡出)

<!DOCTYPE html>
<html>
    <head>
    <title>JQuery Cycle Plugin - Basic Demo</title>
    <style type="text/css">
        .slideshow { height: 232px; width: 232px; margin: auto }
        .slideshow img { padding: 15px; border: 1px solid #ccc; background-color: #eee; }
    </style>


<!-- include jQuery library -->
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<!-- include Cycle plugin -->
    <script type="text/javascript" src="http://malsup.github.com/jquery.cycle.all.js"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            $('.slideshow').cycle({
                 fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
            });
        });
    </script>
    </head>
    <body>
         <div class="slideshow">
              <img src="http://malsup.github.com/images/beach1.jpg" width="200" height="200" />
              <img src="http://malsup.github.com/images/beach2.jpg" width="200" height="200" />
              <img src="http://malsup.github.com/images/beach3.jpg" width="200" height="200" />
              <img src="http://malsup.github.com/images/beach4.jpg" width="200" height="200" />
              <img src="http://malsup.github.com/images/beach5.jpg" width="200" height="200" />
         </div>
    </body>
</html>

 

jQuery Cycle Plugin:http://jquery.malsup.com/cycle/

 

 

參考或是複製語法時,別忘了留個言喔 ^ ^ ~