播放/暂停的 slide滑动焦点图
XML/HTML Code
- <div class="container">
- <div id="slides">
- <img src="../mohe.png" alt="">
- <img src="../sanya.jpg" alt="">
- <img src="../dalian.jpg" alt="">
- <img src="../dandong.png" alt="">
- </div>
- </div>
JavaScript Code
- <script>
- $(function() {
- $('#slides').slidesjs({
- width: 600,
- height: 328,
- play: {
- active: true,
- auto: true,
- interval: 4000,
- swap: true
- }
- });
- });
- </script>
CSS Code
- <style>
- #slides {
- display: none
- }
- .container {
- margin: 0 auto
- }
- /* For tablets & smart phones */
- @media (max-width: 767px) {
- body {
- padding-left: 20px;
- padding-right: 20px;
- }
- .container {
- width: auto
- }
- }
- /* For smartphones */
- @media (max-width: 480px) {
- .container {
- width: auto
- }
- }
- /* For smaller displays like laptops */
- @media (min-width: 568px) and (max-width: 579px) {
- .container {
- width: 600px
- }
- }
- /* For larger displays */
- @media (min-width: 500px) {
- .container {
- width: 600px
- }
- }
- </style>
原文地址:http://www.freejs.net/article_jiaodiantu_254.html