利用jquery css3实现Bootslider幻灯片插件



40 156 53



特效描述:利用jquery css3实现 Bootslider 幻灯片插件,利用jquery css3实现Bootslider幻灯片插件

代码结构

1. 引入CSS

<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link href="css/animate.css" rel="stylesheet" type="text/css" />
<link href="css/bootslider.css" rel="stylesheet" type="text/css" />
<link href="css/bs-theme-metro.css" rel="stylesheet" type="text/css" />
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,600' rel='stylesheet' type='text/css'>

2. 引入JS

<script src="js/jquery-1.10.1.min.js" type="text/javascript"></script>
<script src="js/bootstrap.min.js" type="text/javascript"></script>
<script src="js/touchSwipe.js" type="text/javascript"></script>
<script src="js/mousewheel.js" type="text/javascript"></script>
<script src="js/fitvids.js" type="text/javascript"></script>
<script src="js/bootslider.js" type="text/javascript"></script>

3. HTML代码

        <div class="bootslider" id="bootslider">
            <!-- Bootslider Loader -->
            <div class="bs-loader">
                <img src="img/loader.gif" width="31" height="31" alt="Loading.." id="loader"/>
            </div>
            <!-- /Bootslider Loader -->
            <!-- Bootslider Container -->
            <div class="bs-container">
                <!-- Bootslider Slide -->
                <div class="bs-slide active" data-animate-in="tada" data-animate-out="bounceOutDown">
                    <div class="bs-foreground">
                        <div class="text-center heading-center">
                            <h1 class="heading" data-animate-in="foolishIn" data-animate-out="bounceOutDown" data-delay="800">simply stunning<span class="text-alizarin">.</span></h1>
                        </div>
                        <div class="text-center logo" data-animate-in="fadeInUp">
                            <i class="fa fa-3x fa-twitter text-white hidden-xs"></i>
                            <h4>
                                <span class="text-alizarin">boot</span><span class="text-white">slider</span>
                            </h4>
                        </div>
                    </div>
                    <div class="bs-background">
                        <img src="img/slide-1.jpg" alt="" />
                    </div>
                </div>
                <!-- /Bootslider Slide -->
                <!-- Bootslider Slide -->
                <div class="bs-slide" data-animate-in="bounceInDown" data-animate-out="flipOutX">
                    <div class="bs-foreground">
                        <div class="text-center heading-center">
                            <h1 class="heading" data-animate-in="twisterInDown" data-animate-out="bounceOutDown" data-delay="800">it's showtime<span class="text-alizarin">.</span></h1>
                        </div>
                        <div class="text-center logo" data-animate-in="fadeInUp">
                            <i class="fa fa-3x fa-twitter text-white hidden-xs"></i>
                            <h4>
                                <span class="text-alizarin">boot</span><span class="text-white">slider</span>
                            </h4>
                        </div>
                    </div>
                    <div class="bs-background">
                        <img src="img/slide-2.jpg" alt="" />
                    </div>
                </div>
                <!-- /Bootslider Slide -->
                <!-- Bootslider Slide -->
                <div class="bs-slide" data-animate-in="flipInX" data-animate-out="rotateRight">
                    <div class="bs-foreground">
                        <div class="text-center heading-center">
                            <h1 class="heading" data-animate-in="swap" data-animate-out="bounceOutDown" data-delay="800">pure eye candy<span class="text-alizarin">.</span></h1>
                        </div>
                        <div class="text-center logo" data-animate-in="fadeInUp">
                            <i class="fa fa-3x fa-twitter text-white hidden-xs"></i>
                            <h4>
                                <span class="text-alizarin">boot</span><span class="text-white">slider</span>
                            </h4>
                        </div>
                    </div>
                    <div class="bs-background">
                        <img src="img/slide-3.jpg" alt="" />
                    </div>
                </div>
                <!-- /Bootslider Slide -->
                <!-- Bootslider Slide -->
                <div class="bs-slide" data-animate-in="rotateIn" data-animate-out="holeOut">
                    <div class="bs-foreground">
                        <div class="text-center heading-center">
                            <h1 class="heading" data-animate-in="fadeInDown" data-animate-out="bounceOutDown" data-delay="800">bootslider<span class="text-alizarin">.</span></h1>
                            <h3 class="text-white hidden-xs" data-animate-in="fadeInUp" data-animate-out="bounceOutDown" data-delay="800">your favorite</h3>
                        </div>
                        <div class="text-center logo" data-animate-in="fadeIn"> 
                            <i class="fa fa-3x fa-twitter text-white hidden-xs"></i>
                            <h4>
                                <span class="text-alizarin">boot</span><span class="text-white">slider</span>
                            </h4>
                        </div>
                    </div>
                    <div class="bs-background">
                        <img src="img/slide-6.jpg" alt="" />
                    </div>
                </div>
                <!-- /Bootslider Slide -->
                <!-- Bootslider Slide -->
                <div class="bs-slide" data-animate-in="openUpRightReturn" data-animate-out="slideDown">
                    <div class="bs-foreground">
                        <div class="container">
                            <div class="row">
                                <div class="col-md-offset-3 col-md-6 col-xs-offset-3 col-xs-6 text-center">
                                    <br/><br/><br/>
                                    <div class="bs-video" data-animate-in="twisterInUp" data-delay="800" data-animate-out="fadeOut"> 
                                        <iframe src="//player.vimeo.com/video/6857186" width="500" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="text-center logo"  data-animate-in="fadeInUp">
                            <i class="fa fa-3x fa-twitter text-white hidden-xs"></i>
                            <h4>
                                <span class="text-alizarin">boot</span><span class="text-white">slider</span>
                            </h4>
                        </div>
                    </div>
                    <div class="bs-background">
                        <img src="img/slide-4.jpg" alt="" />
                    </div>
                </div>
                <!-- /Bootslider Slide -->
                <!-- Bootslider Slide -->
                <div class="bs-slide" data-animate-in="openDownLeftReturn" data-animate-out="slideUp">
                    <div class="bs-foreground">
                        <div class="bs-video-fullscreen" data-animate-in="fadeIn" data-delay="800" data-animate-out="fadeOut">
                            <iframe src="//player.vimeo.com/video/52283333" width="500" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> 
                        </div>
                    </div>
                    <div class="bs-background">
                        <img src="img/slide-5.jpg" alt="" />
                    </div>
                </div>
                <!-- /Bootslider Slide -->
            </div>
            <!-- /Bootslider Container -->
            <!-- Bootslider Progress -->
            <div class="bs-progress progress">
                <div class="progress-bar alizarin"></div>
            </div>
            <!-- /Bootslider Progress -->
            <!-- Bootslider Thumbnails -->
            <div class="bs-thumbnails text-center text-alizarin">
                <ul class=""></ul>
            </div>
            <!-- /Bootslider Thumbnails -->
            <!-- Bootslider Pagination -->
            <div class="bs-pagination text-center text-alizarin">
                <ul class="list-inline"></ul>
            </div>
            <!-- /Bootslider Pagination -->
            <!-- Bootslider Controls -->
            <div class="text-center">
                <div class="bs-controls">
                    <a href="javascript:void(0);" class="bs-prev alizarin">&lt;</a>
                    <a href="javascript:void(0);" class="bs-next alizarin">&gt;</a>
                </div>
            </div>
            <!-- /Bootslider Controls -->
        </div>
        <br/><br/><br/>
        <script>
            $(document).ready(function() {
                var slider = new bootslider('#bootslider', {
                    animationIn: "fadeInUp",
                    animationOut: "flipOutX",
                    timeout: 5000,
                    autoplay: true,
                    preload: true,
                    pauseOnHover: false,
                    thumbnails: true,
                    pagination: true,
                    mousewheel: false,
                    keyboard: true,
                    touchscreen: true
                });
                slider.init();
            });
        </script>
<div style="text-align:center;clear:both">
</div>



用户评论
大牛,别默默的看了,快登录帮我点评一下吧!:)      登录 | 注册


热门标签: flash焦点图 flash幻灯片 flashbanner flash图片轮播 加载动画 滑动选项卡 滑动切换 滚动切换 滚动条切换 滑动手风琴 选项卡切换 选项卡 切换 tab切换 页面切换 选项卡插件 切换插件 全屏焦点图 滑动星星打分 h5弹窗动画 html5弹窗动画 全屏切换 宽屏全屏 宽屏 全屏 页面全屏 页面宽屏 h5动画 h5背景动画 h5场景动画 h53D动画 h5界面动画 html5动画 焦点图 幻灯片 轮播图 bar焦点图 h5按钮动画 html5按钮动画 其他 图片全屏 h5图片动画 h5图标动画 html5图片动画 html5图标动画 图片切换 图片选项卡 图标选项卡 全屏焦点图 选项卡自动切换 进度条 进度条插件

×
×

注册

官方QQ群

扫描上面二维码加微信群

官方QQ群

jQuery/js讨论群
群号:642649996
Css3+Html5讨论群
群号:322131262

加群请备注:从官网了解到