jQuery.skipper全屏響應式圖片幻燈片輪播切換代碼



108 429 144



特效描述:jQuery.skipper 全屏響應式圖片 幻燈片 輪播切換,全屏響應式圖片幻燈片輪播切換代碼

代碼結構

1. 引入CSS

<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="skippr/css/jquery.skippr.css">

2. 引入JS

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.10.2.min.js"><\/script>')</script>
<script src="skippr/js/jquery.skippr.js"></script>

3. HTML代碼

        <!--[if lt IE 7]>
            <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
        <![endif]-->
        <div class="hero">
            <div id="random">
                <div class="yellow"></div>
                <div style="background-image: url(img/test2.jpg)"></div>
                <div style="background-image: url(img/test5.jpg)"></div> 
                <div style="background-image: url(img/test3.jpg)"></div>                   
                <div style="background-image: url(img/test4.jpg)"></div>
            </div>
            <!-- <div id="random">
                <img src="img/test3.jpg">
                <img src="img/test4.jpg">
                <img src="img/test1.jpg">
                <img src="img/test5.jpg">
            </div> -->
            <div class="container">
                <div class="tagline">
                    <h1>Skippr.</h1>
                    <p>A faster, lighter slideshow plugin.<br> Only 3kb minified.</p>
                </div>
                <div class="downloads">
                    <div class="btn-container">
                         <a href="skippr-master.zip" target="_blank"><div class="btn">Download</div></a>
                        <a href="http://www.github.com/austenpayan/skippr" target="_blank"><div class="btn">Github</div></a>
                    </div>
                </div>
            </div>
        </div>
        <div class="content">
            <h2>The setup.</h2>
            <p>Include jquery.skippr.css inside your head tag and jquery.skippr.js just before the closing body tag.</p>
            <p>Be sure to include jQuery before jquery.skippr.js</p>
            <pre>
            <code id="code-header">
    &lt;head>
        &lt;title>Your Awesome Website&lt;/title>        
        &lt;link rel="stylesheet" href="css/jquery.skippr.css"&gt;
    &lt;/head>
    &lt;body>
            </code>
            </pre>
            <pre>
            <code id="code-footer">
        &lt;script src="//code.jquery.com/jquery-1.11.0.min.js">&lt;/script>
        &lt;script src="js/jquery.skippr.js">&lt;/script>
    &lt;/body>
            </code>
            </pre>
            <p>Create a target element with divs inside, one for each slide, 
                and add a background image with css or the style attribute.
                Skippr targets div tags inside of the selected element with background-images applied to them.
                Put this target element inside of a container element styled and positioned to your liking.
                The target element will completely fill it's parent container element.</p>
            <p>&nbsp;</p>
            <p>**Note: The container element must have a specified width and height, and position other than static to work properly.</p>
            <pre>
            <code id="code-elements">
        &lt;div id="container">
            &lt;div id="theTarget">
                &lt;div style="background-image: url(img/image1.jpg)">
                &lt;div style="background-image: url(img/image2.jpg)">
                &lt;div style="background-image: url(img/image3.jpg)">
                &lt;div style="background-image: url(img/image4.jpg)">
                &lt;div style="background-image: url(img/image5.jpg)">
            &lt;/div>    
        &lt;/div>
            </code>
            </pre>
            <h2>Initiate.</h2>
            <p>Just select the parent element with jQuery and call the skippr method. Thats it!</p>
            <pre>
            <code id="code-initiate">
        $(document).ready(function(){
            $("#theTarget").skippr();
        });    
            </code>
            </pre>
            <h2>Options.</h2>
            <p>Pass in an options object as a parameter to the skippr method for customization.</p>
            <pre>
            <code id="code-options">
        <span class="code-comment">// Defaults </span>  
        $("#theTarget").skippr({
            speed: 500,
            navType: 'block',
            childrenElementType: 'div',
            arrows: true,
            autoPlay: false,
            autoPlayDuration: 5000
        });
            </code>
            </pre>
            <p><b>speed</b> : enter length of time in milliseconds you want the transition between slides to take. Default is 500.</p>
            <p><b>navType</b> : enter a string of what shape you want the navigation elements to be. Skippr currently
                takes either "block" or "bubble". Default is "block".</p>
            <p><b>childrenElementType</b> : choose the children element type of the target element. Skippr now accepts either 'div' or 'img'. Default is 'div'.  </p>
            <p><b>arrows</b> : boolean value determining whether or not to display navigation arrows. Default is true. Set to false to hide arrows.</p>
            <p><b>autoPlay</b> : boolean value determining whether or not to use auto-playing functionality in the slideshow. Default is false. Set to true to activate auto-play. </p>
            <p><b>autoPlayDuration</b>  <span class="new-option">new</span> : sets the amount of time in milliseconds to display each slide when autoPlay is running. Default is 5000 milliseconds.</p>
            <hr>
            <p>Skippr will be an ongoing project.</p>
            <p>Check back or star on Github for updates.</p>
            <hr>
        </div>
        <div class="hero">
            <div id="random2">
                <div style="background-image: url(img/test2.jpg)"></div>
                <div style="background-image: url(img/test5.jpg)"></div> 
                <div style="background-image: url(img/test3.jpg)"></div>                   
                <div style="background-image: url(img/test4.jpg)"></div>
            </div>
        </div>
        <div class="download">
            <div>
                <h1>Get it.</h1>
                <div class="btn-container">
                    <a href="skippr-master.zip" target="_blank"><div class="btn">Download</div></a>
                     <a href="http://www.github.com/austenpayan/skippr" target="_blank"><div class="btn">Github</div></a>
                </div>
            </div>
        </div>
        <footer>
            <div class="info">
                <p>created by austen payan</p>
                <p><a href="mailto:[email protected]">[email protected]</a></p>
                <p><a href="http://iamapioneer.com" target="_blank">iamapioneer.com</a></p>
            </div>
        </footer>
           <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
           <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
        <script>window.jQuery || document.write('<script src="js/vendor/jquery-1.10.2.min.js"><\/script>')</script>
        <script src="skippr/js/jquery.skippr.js"></script>
        <script>
            $(document).ready(function() {
                $("#random").skippr();
                $("#random2").skippr({
                    navType: 'bubble',
                    autoPlay: true,
                    autoPlayDuration: 2000
                });
            });
        </script>
        <!-- Google Analytics: change UA-XXXXX-X to be your site's ID. -->
        <script>
            (function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=
            function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;
            e=o.createElement(i);r=o.getElementsByTagName(i)[0];
            e.src='//www.google-analytics.com/analytics.js';
            r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
            ga('create','UA-XXXXX-X');ga('send','pageview');
        </script>



用戶評論
大牛,別默默的看了,快登錄幫我點評一下吧!:)      登錄 | 注冊


熱門標簽: 圖片疊加 圖片層疊 圖片拖動 圖片拖拽 圖片翻轉 圖片旋轉 圖片延遲加載 圖片延遲 圖片加載 圖片淡出淡進 圖片淡出 圖片淡進 圖片全屏 頭像上傳 圖片上傳 二維碼 圖片放大鏡 h5圖片動畫 h5圖標動畫 html5圖片動畫 html5圖標動畫 帶縮略圖的幻燈片 地圖 中國地圖 世界地圖 滑動 滑塊 滑動門 觸屏滑動 滑動插件 滑塊插件 圖片放大縮小 圖片縮放 圖片大小 圖片放大 圖片縮小 圖片變大 圖片變小 flash焦點圖 flash幻燈片 flashbanner flash圖片輪播 滾動切換 滾動條切換 圖片廣告 滑動選項卡 滑動切換 純圖片輪播 圖片輪播 圖片滾動 圖片滾動條 圖片滑動 圖片滑塊 旋轉木馬 圖片旋轉木馬 文字旋轉木馬 旋轉木馬插件 圖片切換 圖片選項卡 圖標選項卡 圖片收縮展開 圖片收縮 圖片展開 圖標導航 圖標菜單 自動滾動圖片輪播 滑動手風琴 背景切換 大圖切換 選項卡切換 選項卡 切換 tab切換 頁面切換 選項卡插件 切換插件 手風琴 水平手風琴 垂直手風琴 圖片手風琴 文字手風琴 手風琴插件 切換按鈕 表單 表單美化 表單插件 表單美化插件 圖表 焦點圖 幻燈片 輪播圖 bar焦點圖 圖片 圖片插件 頭像截圖 圖片滑動 圖片滑塊 圖片切換 圖片選項卡 圖標選項卡 純圖片輪播 圖片輪播 全屏焦點圖 響應式圖片 按鈕控制
?
×
×

注冊

官方QQ群

掃描上面二維碼加微信群

官方QQ群

jQuery/js討論群
群號:642649996
Css3+Html5討論群
群號:322131262

加群請備注:從官網了解到

湖北30选5开奖结果走势图表