美文网首页前端技术人生代码程序员
从右向左轮播文字及图片功能

从右向左轮播文字及图片功能

作者: 请叫我小胖纸_7ad5 | 来源:发表于2018-02-10 16:27 被阅读39次
    4.jpg
    
    <!DOCTYPE html>
    <html lang="en"> 
        <head>
            <meta charset=utf-8>
            <meta name="viewport" content="width=device-width, initial-scale=1.0">
            <title>轮播图</title>
            <!-- <link rel="stylesheet" type="text/css" href="css/jquery.cslider.css" /> -->
            <style>
                .da-slider {
                    width: 100%;
                    min-width: 320px;
                    height: 520px;
                    position: relative;
                    margin:0 auto;
                    overflow: hidden;
                    background: transparent url(../images/Slider.png) repeat-x 0% center; 
                    background-size:auto 100%;
                    -webkit-transition: background-position 1s ease-out 0.3s;
                    -moz-transition: background-position 1s ease-out 0.3s;
                    -o-transition: background-position 1s ease-out 0.3s;
                    -ms-transition: background-position 1s ease-out 0.3s;
                    transition: background-position 1s ease-out 0.3s;
                }
    
                .da-slider .triangle{
                    clear: none;
                    top:0;
                    z-index:999;
                }
    
                .da-slider .mask {
                    position:absolute;
                    top:0;
                    left:0;
                    width:100%;
                    height:100%;
                    background: #FECE1A;
                    opacity:0.85;
                    filter: alpha(opacity=85);
                }
                .da-slider .container {
                    margin-top:-30px;
                    position:relative;
                    height:100%;
                }
                .da-slide {
                    position: absolute;
                    width: 100%;
                    height: 100%;
                    top: 0px;
                    left: 0px;
                    text-align: left;
                }
                .da-slide-current {
                    z-index: 900;
                }
                .da-slider-fb .da-slide {
                    left: 100%;
                display:none;
                }
                .da-slider-fb .da-slide.da-slide-current {
                    left: 0px;
                    display:block;
    
                }
                .da-slide h2, .da-slide h4, .da-slide p, .da-slide .da-link, .da-slide .da-img {
                    position: absolute;
                    opacity: 0;
                    filter: alpha(opacity=0);
                    left: 110%;
                }
                .da-slider-fb .da-slide h2, .da-slider-fb .da-slide h4, .da-slider-fb .da-slide p, .da-slider-fb .da-slide .da-link {
                    left: 10%;
                    opacity: 1;
                    display:block;
                    filter: alpha(opacity=100);
                }
                .da-slider-fb .da-slide .da-img {
                    left: 60%;
                    opacity: 1;
                    display:block;
                    filter: alpha(opacity=100);
                }
    
                .da-slide h2,
                .da-slide h4{
                    color: #181A1C;
                    text-transform:uppercase;
                    white-space: nowrap;
                    z-index: 10;
                }
                .da-slide h2 {
                    font-size: 33px;
                    width: 50%;
                    top: 120px;
                    font-weight:bold;
                }
    
                .da-slide h4{
                    width: 50%;
                    font-size:22px;
                    top: 175px;
                    font-weight: normal;
                }
                .da-slide p {
                    width: 45%;
                    padding:0px;
                    top: 230px;
                    color: #fff;
                    height: 90px;
                    overflow: hidden;
                    font-weight: 400;
                }
                .da-slide .da-img {
                    text-align: center;
                    width: 40%;
                    top: 80px;
                    height: 256px;
                    line-height: 360px;
                    left: 110%;
                    /*60%*/
                }
                .da-slide .da-link {
                    top: 340px;
                    margin:0;
                    font-size: 18px;
                    text-align: center;
                }
                .da-dots {
                    width: 100%;
                    position: absolute;
                    text-align: center;
                    left: 0px;
                    bottom: 20px;
                    z-index: 900;
                    -moz-user-select: none;
                    -webkit-user-select: none;
                }
                .da-dots span {
                    display: inline-block;
                    width:50px;
                    height:3px;
                    margin:0 5px 0 0;
                    background:#fff;
                    cursor: pointer;
                    position: relative;
                }
                .da-dots span.da-dots-current {
                background:#29383F;
                }
                .da-arrows {
                    -moz-user-select: none;
                    -webkit-user-select: none;
                }
                .da-arrows span {
                    position: absolute;
                    height: 100%;
                    width: 45px;
                    cursor: pointer;
                    z-index: 900;
                    opacity: 0;
                }
                .da-slider:hover .da-arrows span {
                    opacity: 1;
                }
                .da-arrows span:after {
                    content:'';
                    position: absolute;
                }
                .da-arrows span:hover:after {
                    box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
                }
                .da-arrows span:active:after {
                    box-shadow: 1px 1px 1px rgba(255, 255, 255, 0.1);
                }
                .da-arrows span.da-arrows-next:after {
                    background-position: top right;
                }
                .da-arrows span.da-arrows-prev {
                    left: 15px;
                    background:transparent url(../images/Left.png) no-repeat center center;
                }
                .da-arrows span.da-arrows-next {
                    right: 15px;
                    background:transparent url(../images/Right.png) no-repeat center center;
                    
                }
                .da-slide-current h2, .da-slide-current h4, .da-slide-current p, .da-slide-current .da-link {
                    left: 10%;
                    opacity: 1;
                }
                .da-slide-current .da-img {
                    left: 60%;
                    opacity: 1;
                }
                /* Animation classes and animations */
    
                /* Slide in from the right*/
                .da-slide-fromright h2 {
                    -webkit-animation: fromRightAnim1 0.6s ease-in-out 0.8s both;
                    -moz-animation: fromRightAnim1 0.6s ease-in-out 0.8s both;
                    -o-animation: fromRightAnim1 0.6s ease-in-out 0.8s both;
                    -ms-animation: fromRightAnim1 0.6s ease-in-out 0.8s both;
                    animation: fromRightAnim1 0.6s ease-in-out 0.8s both;
                }
                .da-slide-fromright h4 {
                    -webkit-animation: fromRightAnim1 0.6s ease-in-out 0.8s both;
                    -moz-animation: fromRightAnim1 0.6s ease-in-out 0.8s both;
                    -o-animation: fromRightAnim1 0.6s ease-in-out 0.8s both;
                    -ms-animation: fromRightAnim1 0.6s ease-in-out 0.8s both;
                    animation: fromRightAnim1 0.6s ease-in-out 0.8s both;
                }
                .da-slide-fromright p {
                    -webkit-animation: fromRightAnim2 0.6s ease-in-out 0.8s both;
                    -moz-animation: fromRightAnim2 0.6s ease-in-out 0.8s both;
                    -o-animation: fromRightAnim2 0.6s ease-in-out 0.8s both;
                    -ms-animation: fromRightAnim2 0.6s ease-in-out 0.8s both;
                    animation: fromRightAnim2 0.6s ease-in-out 0.8s both;
                }
                .da-slide-fromright .da-link {
                    -webkit-animation: fromRightAnim3 0.4s ease-in-out 1.2s both;
                    -moz-animation: fromRightAnim3 0.4s ease-in-out 1.2s both;
                    -o-animation: fromRightAnim3 0.4s ease-in-out 1.2s both;
                    -ms-animation: fromRightAnim3 0.4s ease-in-out 1.2s both;
                    animation: fromRightAnim3 0.4s ease-in-out 1.2s both;
                }
                .da-slide-fromright .da-img {
                    -webkit-animation: fromRightAnim4 0.6s ease-in-out 0.8s both;
                    -moz-animation: fromRightAnim4 0.6s ease-in-out 0.8s both;
                    -o-animation: fromRightAnim4 0.6s ease-in-out 0.8s both;
                    -ms-animation: fromRightAnim4 0.6s ease-in-out 0.8s both;
                    animation: fromRightAnim4 0.6s ease-in-out 0.8s both;
                }
                @-webkit-keyframes fromRightAnim1 {
                    0% {
                        left: 110%;
                        opacity: 0;
                    }
                    100% {
                        left: 10%;
                        opacity: 1;
                    }
                }
                @-webkit-keyframes fromRightAnim2 {
                    0% {
                        left: 110%;
                        opacity: 0;
                    }
                    100% {
                        left: 10%;
                        opacity: 1;
                    }
                }
                @-webkit-keyframes fromRightAnim3 {
                    0% {
                        left: 110%;
                        opacity: 0;
                    }
                    1% {
                        left: 10%;
                        opacity: 0;
                    }
                    100% {
                        left: 10%;
                        opacity: 1;
                    }
                }
                @-webkit-keyframes fromRightAnim4 {
                    0% {
                        left: 110%;
                        opacity: 0;
                    }
                    100% {
                        left: 60%;
                        opacity: 1;
                    }
                }
                @-moz-keyframes fromRightAnim1 {
                    0% {
                        left: 110%;
                        opacity: 0;
                    }
                    100% {
                        left: 10%;
                        opacity: 1;
                    }
                }
                @-moz-keyframes fromRightAnim2 {
                    0% {
                        left: 110%;
                        opacity: 0;
                    }
                    100% {
                        left: 10%;
                        opacity: 1;
                    }
                }
                @-moz-keyframes fromRightAnim3 {
                    0% {
                        left: 110%;
                        opacity: 0;
                    }
                    1% {
                        left: 10%;
                        opacity: 0;
                    }
                    100% {
                        left: 10%;
                        opacity: 1;
                    }
                }
                @-moz-keyframes fromRightAnim4 {
                    0% {
                        left: 110%;
                        opacity: 0;
                    }
                    100% {
                        left: 60%;
                        opacity: 1;
                    }
                }
                @-o-keyframes fromRightAnim1 {
                    0% {
                        left: 110%;
                        opacity: 0;
                    }
                    100% {
                        left: 10%;
                        opacity: 1;
                    }
                }
                @-o-keyframes fromRightAnim2 {
                    0% {
                        left: 110%;
                        opacity: 0;
                    }
                    100% {
                        left: 10%;
                        opacity: 1;
                    }
                }
                @-o-keyframes fromRightAnim3 {
                    0% {
                        left: 110%;
                        opacity: 0;
                    }
                    1% {
                        left: 10%;
                        opacity: 0;
                    }
                    100% {
                        left: 10%;
                        opacity: 1;
                    }
                }
                @-o-keyframes fromRightAnim4 {
                    0% {
                        left: 110%;
                        opacity: 0;
                    }
                    100% {
                        left: 60%;
                        opacity: 1;
                    }
                }
                @-ms-keyframes fromRightAnim1 {
                    0% {
                        left: 110%;
                        opacity: 0;
                    }
                    100% {
                        left: 10%;
                        opacity: 1;
                    }
                }
                @-ms-keyframes fromRightAnim2 {
                    0% {
                        left: 110%;
                        opacity: 0;
                    }
                    100% {
                        left: 10%;
                        opacity: 1;
                    }
                }
                @-ms-keyframes fromRightAnim3 {
                    0% {
                        left: 110%;
                        opacity: 0;
                    }
                    1% {
                        left: 10%;
                        opacity: 0;
                    }
                    100% {
                        left: 10%;
                        opacity: 1;
                    }
                }
                @-ms-keyframes fromRightAnim4 {
                    0% {
                        left: 110%;
                        opacity: 0;
                    }
                    100% {
                        left: 60%;
                        opacity: 1;
                    }
                }
                @keyframes fromRightAnim1 {
                    0% {
                        left: 110%;
                        opacity: 0;
                    }
                    100% {
                        left: 10%;
                        opacity: 1;
                    }
                }
                @keyframes fromRightAnim2 {
                    0% {
                        left: 110%;
                        opacity: 0;
                    }
                    100% {
                        left: 10%;
                        opacity: 1;
                    }
                }
                @keyframes fromRightAnim3 {
                    0% {
                        left: 110%;
                        opacity: 0;
                    }
                    1% {
                        left: 10%;
                        opacity: 0;
                    }
                    100% {
                        left: 10%;
                        opacity: 1;
                    }
                }
                @keyframes fromRightAnim4 {
                    0% {
                        left: 110%;
                        opacity: 0;
                    }
                    100% {
                        left: 60%;
                        opacity: 1;
                    }
                }
                /* Slide in from the left*/
                .da-slide-fromleft h2 {
                    -webkit-animation: fromLeftAnim1 0.6s ease-in-out 0.6s both;
                    -moz-animation: fromLeftAnim1 0.6s ease-in-out 0.6s both;
                    -o-animation: fromLeftAnim1 0.6s ease-in-out 0.6s both;
                    -ms-animation: fromLeftAnim1 0.6s ease-in-out 0.6s both;
                    animation: fromLeftAnim1 0.6s ease-in-out 0.6s both;
                }
                .da-slide-fromleft h4 {
                    -webkit-animation: fromLeftAnim1 0.6s ease-in-out 0.6s both;
                    -moz-animation: fromLeftAnim1 0.6s ease-in-out 0.6s both;
                    -o-animation: fromLeftAnim1 0.6s ease-in-out 0.6s both;
                    -ms-animation: fromLeftAnim1 0.6s ease-in-out 0.6s both;
                    animation: fromLeftAnim1 0.6s ease-in-out 0.6s both;
                }
                .da-slide-fromleft p {
                    -webkit-animation: fromLeftAnim2 0.6s ease-in-out 0.6s both;
                    -moz-animation: fromLeftAnim2 0.6s ease-in-out 0.6s both;
                    -o-animation: fromLeftAnim2 0.6s ease-in-out 0.6s both;
                    -ms-animation: fromLeftAnim2 0.6s ease-in-out 0.6s both;
                    animation: fromLeftAnim2 0.6s ease-in-out 0.6s both;
                }
                .da-slide-fromleft .da-link {
                    -webkit-animation: fromLeftAnim3 0.4s ease-in-out 1.2s both;
                    -moz-animation: fromLeftAnim3 0.4s ease-in-out 1.2s both;
                    -o-animation: fromLeftAnim3 0.4s ease-in-out 1.2s both;
                    -ms-animation: fromLeftAnim3 0.4s ease-in-out 1.2s both;
                    animation: fromLeftAnim3 0.4s ease-in-out 1.2s both;
                }
                .da-slide-fromleft .da-img {
                    -webkit-animation: fromLeftAnim4 0.6s ease-in-out 0.6s both;
                    -moz-animation: fromLeftAnim4 0.6s ease-in-out 0.6s both;
                    -o-animation: fromLeftAnim4 0.6s ease-in-out 0.6s both;
                    -ms-animation: fromLeftAnim4 0.6s ease-in-out 0.6s both;
                    animation: fromLeftAnim4 0.6s ease-in-out 0.6s both;
                }
                @-webkit-keyframes fromLeftAnim1 {
                    0% {
                        left: -110%;
                        opacity: 0;
                    }
                    100% {
                        left: 10%;
                        opacity: 1;
                    }
                }
                @-webkit-keyframes fromLeftAnim2 {
                    0% {
                        left: -110%;
                        opacity: 0;
                    }
                    100% {
                        left: 10%;
                        opacity: 1;
                    }
                }
                @-webkit-keyframes fromLeftAnim3 {
                    0% {
                        left: -110%;
                        opacity: 0;
                    }
                    1% {
                        left: 10%;
                        opacity: 0;
                    }
                    100% {
                        left: 10%;
                        opacity: 1;
                    }
                }
                @-webkit-keyframes fromLeftAnim4 {
                    0% {
                        left: -110%;
                        opacity: 0;
                    }
                    100% {
                        left: 60%;
                        opacity: 1;
                    }
                }
                @-moz-keyframes fromLeftAnim1 {
                    0% {
                        left: -110%;
                        opacity: 0;
                    }
                    100% {
                        left: 10%;
                        opacity: 1;
                    }
                }
                @-moz-keyframes fromLeftAnim2 {
                    0% {
                        left: -110%;
                        opacity: 0;
                    }
                    100% {
                        left: 10%;
                        opacity: 1;
                    }
                }
                @-moz-keyframes fromLeftAnim3 {
                    0% {
                        left: -110%;
                        opacity: 0;
                    }
                    1% {
                        left: 10%;
                        opacity: 0;
                    }
                    100% {
                        left: 10%;
                        opacity: 1;
                    }
                }
                @-moz-keyframes fromLeftAnim4 {
                    0% {
                        left: -110%;
                        opacity: 0;
                    }
                    100% {
                        left: 60%;
                        opacity: 1;
                    }
                }
                @-o-keyframes fromLeftAnim1 {
                    0% {
                        left: -110%;
                        opacity: 0;
                    }
                    100% {
                        left: 10%;
                        opacity: 1;
                    }
                }
                @-o-keyframes fromLeftAnim2 {
                    0% {
                        left: -110%;
                        opacity: 0;
                    }
                    100% {
                        left: 10%;
                        opacity: 1;
                    }
                }
                @-o-keyframes fromLeftAnim3 {
                    0% {
                        left: -110%;
                        opacity: 0;
                    }
                    1% {
                        left: 10%;
                        opacity: 0;
                    }
                    100% {
                        left: 10%;
                        opacity: 1;
                    }
                }
                @-o-keyframes fromLeftAnim4 {
                    0% {
                        left: -110%;
                        opacity: 0;
                    }
                    100% {
                        left: 60%;
                        opacity: 1;
                    }
                }
                @-ms-keyframes fromLeftAnim1 {
                    0% {
                        left: -110%;
                        opacity: 0;
                    }
                    100% {
                        left: 10%;
                        opacity: 1;
                    }
                }
                @-ms-keyframes fromLeftAnim2 {
                    0% {
                        left: -110%;
                        opacity: 0;
                    }
                    100% {
                        left: 10%;
                        opacity: 1;
                    }
                }
                @-ms-keyframes fromLeftAnim3 {
                    0% {
                        left: -110%;
                        opacity: 0;
                    }
                    1% {
                        left: 10%;
                        opacity: 0;
                    }
                    100% {
                        left: 10%;
                        opacity: 1;
                    }
                }
                @-ms-keyframes fromLeftAnim4 {
                    0% {
                        left: -110%;
                        opacity: 0;
                    }
                    100% {
                        left: 60%;
                        opacity: 1;
                    }
                }
                @keyframes fromLeftAnim1 {
                    0% {
                        left: -110%;
                        opacity: 0;
                    }
                    100% {
                        left: 10%;
                        opacity: 1;
                    }
                }
                @keyframes fromLeftAnim2 {
                    0% {
                        left: -110%;
                        opacity: 0;
                    }
                    100% {
                        left: 10%;
                        opacity: 1;
                    }
                }
                @keyframes fromLeftAnim3 {
                    0% {
                        left: -110%;
                        opacity: 0;
                    }
                    1% {
                        left: 10%;
                        opacity: 0;
                    }
                    100% {
                        left: 10%;
                        opacity: 1;
                    }
                }
                @keyframes fromLeftAnim4 {
                    0% {
                        left: -110%;
                        opacity: 0;
                    }
                    100% {
                        left: 60%;
                        opacity: 1;
                    }
                }
                /* Slide out to the right */
                .da-slide-toright h2 {
                    -webkit-animation: toRightAnim1 0.6s ease-in-out 0.6s both;
                    -moz-animation: toRightAnim1 0.6s ease-in-out 0.6s both;
                    -o-animation: toRightAnim1 0.6s ease-in-out 0.6s both;
                    -ms-animation: toRightAnim1 0.6s ease-in-out 0.6s both;
                    animation: toRightAnim1 0.6s ease-in-out 0.6s both;
                }
    
                .da-slide-toright h4 {
                    -webkit-animation: toRightAnim1 0.6s ease-in-out 0.6s both;
                    -moz-animation: toRightAnim1 0.6s ease-in-out 0.6s both;
                    -o-animation: toRightAnim1 0.6s ease-in-out 0.6s both;
                    -ms-animation: toRightAnim1 0.6s ease-in-out 0.6s both;
                    animation: toRightAnim1 0.6s ease-in-out 0.6s both;
                }
                .da-slide-toright p {
                    -webkit-animation: toRightAnim2 0.6s ease-in-out 0.3s both;
                    -moz-animation: toRightAnim2 0.6s ease-in-out 0.3s both;
                    -o-animation: toRightAnim2 0.6s ease-in-out 0.3s both;
                    -ms-animation: toRightAnim2 0.6s ease-in-out 0.3s both;
                    animation: toRightAnim2 0.6s ease-in-out 0.3s both;
                }
                .da-slide-toright .da-link {
                    -webkit-animation: toRightAnim3 0.4s ease-in-out both;
                    -moz-animation: toRightAnim3 0.4s ease-in-out both;
                    -o-animation: toRightAnim3 0.4s ease-in-out both;
                    -ms-animation: toRightAnim3 0.4s ease-in-out both;
                    animation: toRightAnim3 0.4s ease-in-out both;
                }
                .da-slide-toright .da-img {
                    -webkit-animation: toRightAnim4 0.6s ease-in-out both;
                    -moz-animation: toRightAnim4 0.6s ease-in-out both;
                    -o-animation: toRightAnim4 0.6s ease-in-out both;
                    -ms-animation: toRightAnim4 0.6s ease-in-out both;
                    animation: toRightAnim4 0.6s ease-in-out both;
                }
                @-webkit-keyframes toRightAnim1 {
                    0% {
                        left: 10%;
                        opacity: 1;
                    }
                    100% {
                        left: 100%;
                        opacity: 0;
                    }
                }
                @-webkit-keyframes toRightAnim2 {
                    0% {
                        left: 10%;
                        opacity: 1;
                    }
                    100% {
                        left: 100%;
                        opacity: 0;
                    }
                }
                @-webkit-keyframes toRightAnim3 {
                    0% {
                        left: 10%;
                        opacity: 1;
                    }
                    99% {
                        left: 10%;
                        opacity: 0;
                    }
                    100% {
                        left: 100%;
                        opacity: 0;
                    }
                }
                @-webkit-keyframes toRightAnim4 {
                    0% {
                        left: 60%;
                        opacity: 1;
                    }
                    30% {
                        left: 55%;
                        opacity: 1;
                    }
                    100% {
                        left: 100%;
                        opacity: 0;
                    }
                }
                @-moz-keyframes toRightAnim1 {
                    0% {
                        left: 10%;
                        opacity: 1;
                    }
                    100% {
                        left: 100%;
                        opacity: 0;
                    }
                }
                @-moz-keyframes toRightAnim2 {
                    0% {
                        left: 10%;
                        opacity: 1;
                    }
                    100% {
                        left: 100%;
                        opacity: 0;
                    }
                }
                @-moz-keyframes toRightAnim3 {
                    0% {
                        left: 10%;
                        opacity: 1;
                    }
                    99% {
                        left: 10%;
                        opacity: 0;
                    }
                    100% {
                        left: 100%;
                        opacity: 0;
                    }
                }
                @-moz-keyframes toRightAnim4 {
                    0% {
                        left: 60%;
                        opacity: 1;
                    }
                    30% {
                        left: 55%;
                        opacity: 1;
                    }
                    100% {
                        left: 100%;
                        opacity: 0;
                    }
                }
                @-o-keyframes toRightAnim1 {
                    0% {
                        left: 10%;
                        opacity: 1;
                    }
                    100% {
                        left: 100%;
                        opacity: 0;
                    }
                }
                @-o-keyframes toRightAnim2 {
                    0% {
                        left: 10%;
                        opacity: 1;
                    }
                    100% {
                        left: 100%;
                        opacity: 0;
                    }
                }
                @-o-keyframes toRightAnim3 {
                    0% {
                        left: 10%;
                        opacity: 1;
                    }
                    99% {
                        left: 10%;
                        opacity: 0;
                    }
                    100% {
                        left: 100%;
                        opacity: 0;
                    }
                }
                @-o-keyframes toRightAnim4 {
                    0% {
                        left: 60%;
                        opacity: 1;
                    }
                    30% {
                        left: 55%;
                        opacity: 1;
                    }
                    100% {
                        left: 100%;
                        opacity: 0;
                    }
                }
                @-ms-keyframes toRightAnim1 {
                    0% {
                        left: 10%;
                        opacity: 1;
                    }
                    100% {
                        left: 100%;
                        opacity: 0;
                    }
                }
                @-ms-keyframes toRightAnim2 {
                    0% {
                        left: 10%;
                        opacity: 1;
                    }
                    100% {
                        left: 100%;
                        opacity: 0;
                    }
                }
                @-ms-keyframes toRightAnim3 {
                    0% {
                        left: 10%;
                        opacity: 1;
                    }
                    99% {
                        left: 10%;
                        opacity: 0;
                    }
                    100% {
                        left: 100%;
                        opacity: 0;
                    }
                }
                @-ms-keyframes toRightAnim4 {
                    0% {
                        left: 60%;
                        opacity: 1;
                    }
                    30% {
                        left: 55%;
                        opacity: 1;
                    }
                    100% {
                        left: 100%;
                        opacity: 0;
                    }
                }
                @keyframes toRightAnim1 {
                    0% {
                        left: 10%;
                        opacity: 1;
                    }
                    100% {
                        left: 100%;
                        opacity: 0;
                    }
                }
                @keyframes toRightAnim2 {
                    0% {
                        left: 10%;
                        opacity: 1;
                    }
                    100% {
                        left: 100%;
                        opacity: 0;
                    }
                }
                @keyframes toRightAnim3 {
                    0% {
                        left: 10%;
                        opacity: 1;
                    }
                    99% {
                        left: 10%;
                        opacity: 0;
                    }
                    100% {
                        left: 100%;
                        opacity: 0;
                    }
                }
                @keyframes toRightAnim4 {
                    0% {
                        left: 60%;
                        opacity: 1;
                    }
                    30% {
                        left: 55%;
                        opacity: 1;
                    }
                    100% {
                        left: 100%;
                        opacity: 0;
                    }
                }
                /* Slide out to the left*/
                .da-slide-toleft h2 {
                    -webkit-animation: toLeftAnim1 0.6s ease-in-out both;
                    -moz-animation: toLeftAnim1 0.6s ease-in-out both;
                    -o-animation: toLeftAnim1 0.6s ease-in-out both;
                    -ms-animation: toLeftAnim1 0.6s ease-in-out both;
                    animation: toLeftAnim1 0.6s ease-in-out both;
                }
                .da-slide-toleft p {
                    -webkit-animation: toLeftAnim2 0.6s ease-in-out 0.3s both;
                    -moz-animation: toLeftAnim2 0.6s ease-in-out 0.3s both;
                    -o-animation: toLeftAnim2 0.6s ease-in-out 0.3s both;
                    -ms-animation: toLeftAnim2 0.6s ease-in-out 0.3s both;
                    animation: toLeftAnim2 0.6s ease-in-out 0.3s both;
                }
                .da-slide-toleft .da-link {
                    -webkit-animation: toLeftAnim3 0.6s ease-in-out 0.6s both;
                    -moz-animation: toLeftAnim3 0.6s ease-in-out 0.6s both;
                    -o-animation: toLeftAnim3 0.6s ease-in-out 0.6s both;
                    -ms-animation: toLeftAnim3 0.6s ease-in-out 0.6s both;
                    animation: toLeftAnim3 0.6s ease-in-out 0.6s both;
                }
                .da-slide-toleft .da-img {
                    -webkit-animation: toLeftAnim4 0.6s ease-in-out 0.5s both;
                    -moz-animation: toLeftAnim4 0.6s ease-in-out 0.5s both;
                    -o-animation: toLeftAnim4 0.6s ease-in-out 0.5s both;
                    -ms-animation: toLeftAnim4 0.6s ease-in-out 0.5s both;
                    animation: toLeftAnim4 0.6s ease-in-out 0.5s both;
                }
                @-webkit-keyframes toLeftAnim1 {
                    0% {
                        left: 10%;
                        opacity: 1;
                    }
                    30% {
                        left: 15%;
                        opacity: 1;
                    }
                    100% {
                        left: -50%;
                        opacity: 0;
                    }
                }
                @-webkit-keyframes toLeftAnim2 {
                    0% {
                        left: 10%;
                        opacity: 1;
                    }
                    30% {
                        left: 15%;
                        opacity: 1;
                    }
                    100% {
                        left: -50%;
                        opacity: 0;
                    }
                }
                @-webkit-keyframes toLeftAnim3 {
                    0% {
                        left: 10%;
                        opacity: 1;
                    }
                    100% {
                        left: -50%;
                        opacity: 0;
                    }
                }
                @-webkit-keyframes toLeftAnim4 {
                    0% {
                        left: 60%;
                        opacity: 1;
                    }
                    70% {
                        left: 30%;
                        opacity: 0;
                    }
                    100% {
                        left: -50%;
                        opacity: 0;
                    }
                }
                @-moz-keyframes toLeftAnim1 {
                    0% {
                        left: 10%;
                        opacity: 1;
                    }
                    30% {
                        left: 15%;
                        opacity: 1;
                    }
                    100% {
                        left: -50%;
                        opacity: 0;
                    }
                }
                @-moz-keyframes toLeftAnim2 {
                    0% {
                        left: 10%;
                        opacity: 1;
                    }
                    30% {
                        left: 15%;
                        opacity: 1;
                    }
                    100% {
                        left: -50%;
                        opacity: 0;
                    }
                }
                @-moz-keyframes toLeftAnim3 {
                    0% {
                        left: 10%;
                        opacity: 1;
                    }
                    100% {
                        left: -50%;
                        opacity: 0;
                    }
                }
                @-moz-keyframes toLeftAnim4 {
                    0% {
                        left: 60%;
                        opacity: 1;
                    }
                    70% {
                        left: 30%;
                        opacity: 0;
                    }
                    100% {
                        left: -50%;
                        opacity: 0;
                    }
                }
                @-o-keyframes toLeftAnim1 {
                    0% {
                        left: 10%;
                        opacity: 1;
                    }
                    30% {
                        left: 15%;
                        opacity: 1;
                    }
                    100% {
                        left: -50%;
                        opacity: 0;
                    }
                }
                @-o-keyframes toLeftAnim2 {
                    0% {
                        left: 10%;
                        opacity: 1;
                    }
                    30% {
                        left: 15%;
                        opacity: 1;
                    }
                    100% {
                        left: -50%;
                        opacity: 0;
                    }
                }
                @-o-keyframes toLeftAnim3 {
                    0% {
                        left: 10%;
                        opacity: 1;
                    }
                    100% {
                        left: -50%;
                        opacity: 0;
                    }
                }
                @-o-keyframes toLeftAnim4 {
                    0% {
                        left: 60%;
                        opacity: 1;
                    }
                    70% {
                        left: 30%;
                        opacity: 0;
                    }
                    100% {
                        left: -50%;
                        opacity: 0;
                    }
                }
                @-ms-keyframes toLeftAnim1 {
                    0% {
                        left: 10%;
                        opacity: 1;
                    }
                    30% {
                        left: 15%;
                        opacity: 1;
                    }
                    100% {
                        left: -50%;
                        opacity: 0;
                    }
                }
                @-ms-keyframes toLeftAnim2 {
                    0% {
                        left: 10%;
                        opacity: 1;
                    }
                    30% {
                        left: 15%;
                        opacity: 1;
                    }
                    100% {
                        left: -50%;
                        opacity: 0;
                    }
                }
                @-ms-keyframes toLeftAnim3 {
                    0% {
                        left: 10%;
                        opacity: 1;
                    }
                    100% {
                        left: -50%;
                        opacity: 0;
                    }
                }
                @-ms-keyframes toLeftAnim4 {
                    0% {
                        left: 60%;
                        opacity: 1;
                    }
                    70% {
                        left: 30%;
                        opacity: 0;
                    }
                    100% {
                        left: -50%;
                        opacity: 0;
                    }
                }
                @keyframes toLeftAnim1 {
                    0% {
                        left: 10%;
                        opacity: 1;
                    }
                    30% {
                        left: 15%;
                        opacity: 1;
                    }
                    100% {
                        left: -50%;
                        opacity: 0;
                    }
                }
                @keyframes toLeftAnim2 {
                    0% {
                        left: 10%;
                        opacity: 1;
                    }
                    30% {
                        left: 15%;
                        opacity: 1;
                    }
                    100% {
                        left: -50%;
                        opacity: 0;
                    }
                }
                @keyframes toLeftAnim3 {
                    0% {
                        left: 10%;
                        opacity: 1;
                    }
                    100% {
                        left: -50%;
                        opacity: 0;
                    }
                }
                @keyframes toLeftAnim4 {
                    0% {
                        left: 60%;
                        opacity: 1;
                    }
                    70% {
                        left: 30%;
                        opacity: 0;
                    }
                    100% {
                        left: -50%;
                        opacity: 0;
                    }
                }
    
                @media (max-width: 979px) {
                    .da-slide h2 {
                        font-size: 28px;
                        top:40px;
                    }
                    
                    .da-slide h4 {
                        font-size: 18px;
                        top: 80px;
                    }
                    
                    .da-slide p {
                        font-size: 14px;
                        line-height:16px;
                        
                        top:120px;
                    }
                    
                    .da-slide .da-img {
                        top:80px;
                        line-height:100px;
                    } 
                    
                    .da-slide .da-link {
                        top:65%;
                    }   
                }
    
                @media (max-width: 767px) {
                    .da-slide h2 {
                        font-size: 20px;
                        top:40px;
                    }
                    
                    .da-slide h4 {
                        font-size: 16px;
                        top:80px;
                    }
                    
                    .da-slide p {
                        display:none;
                    }
                    .da-slide .da-img {
                        top:50px;
                        width:30%;    
                    }  
                    .da-slide .da-link{
                        margin:0;
                        font-size:12px;
                        top:150px; 
                    }  
                }
    
                @media (max-width: 480px) {
                    .da-slide h2 {
                        font-size: 16px;
                        top:30px;
                    }
                    .da-slide h4{
                        font-size: 14px;
                        top: 70px;
                    }
                    
                    .da-slide .da-img {
                        display:none;
                    } 
                    
                    .da-slide .da-link {
                        display:none;
                    } 
                }
            </style>
        </head>
    <body>
            <div id="home">
                <div id="da-slider" class="da-slider">
                    <div class="mask"></div>
                    <div class="container">
                        <div class="da-slide">
                            <h2 class="fittext2">小雅最可爱</h2>
                            <h4>小雅可爱+漂亮+聪明+能干===完美</h4>
                            <p>小雅从小就优秀能干,不知道被多少人暗地里喜欢...hahaha...后来变得越来越优秀了</p>
                            <a href="#" class="da-link button">纯属自娱自乐</a>
                            <div class="da-img">
                                <img src="images/1.jpg" alt="image01" width="320">
                            </div>
                        </div>
                        <div class="da-slide">
                            <h2>小雅最可爱</h2>
                            <h4>小雅可爱+漂亮+聪明+能干===完美</h4>
                            <p>小雅从小就优秀能干...hahaha...后来变得越来越优秀了</p>
                            <a href="#" class="da-link button">纯属自娱自乐</a>
                            <div class="da-img">
                                <img src="images/2.jpg" width="320" alt="image02">
                            </div>
                        </div>
                        <div class="da-slide">
                            <h2>学信欢迎您</h2>
                            <h4>小雅可爱+漂亮+聪明+能干===完美</h4>
                            <p>小雅从小就优秀能干,不知道被多少人暗地里喜欢...hahaha...后来变得越来越优秀了</p>
                            <a href="#" class="da-link button">纯属自娱自乐</a>
                            <div class="da-img">
                                <img src="images/3.jpg" width="320" alt="image03">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
        </body>
    </html>
    <script>
    ;window.Modernizr=function(a,b,c){function x(a){j.cssText=a}function y(a,b){return x(prefixes.join(a+";")+(b||""))}function z(a,b){return typeof a===b}function A(a,b){return!!~(""+a).indexOf(b)}function B(a,b){for(var d in a)if(j[a[d]]!==c)return b=="pfx"?a[d]:!0;return!1}function C(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:z(f,"function")?f.bind(d||b):f}return!1}function D(a,b,c){var d=a.charAt(0).toUpperCase()+a.substr(1),e=(a+" "+n.join(d+" ")+d).split(" ");return z(b,"string")||z(b,"undefined")?B(e,b):(e=(a+" "+o.join(d+" ")+d).split(" "),C(e,b,c))}var d="2.5.3",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m="Webkit Moz O ms",n=m.split(" "),o=m.toLowerCase().split(" "),p={},q={},r={},s=[],t=s.slice,u,v={}.hasOwnProperty,w;!z(v,"undefined")&&!z(v.call,"undefined")?w=function(a,b){return v.call(a,b)}:w=function(a,b){return b in a&&z(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=t.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(t.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(t.call(arguments)))};return e}),p.cssanimations=function(){return D("animationName")},p.csstransitions=function(){return D("transition")};for(var E in p)w(p,E)&&(u=E.toLowerCase(),e[u]=p[E](),s.push((e[u]?"":"no-")+u));return x(""),i=k=null,function(a,b){function g(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function h(){var a=k.elements;return typeof a=="string"?a.split(" "):a}function i(a){var b={},c=a.createElement,e=a.createDocumentFragment,f=e();a.createElement=function(a){var e=(b[a]||(b[a]=c(a))).cloneNode();return k.shivMethods&&e.canHaveChildren&&!d.test(a)?f.appendChild(e):e},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+h().join().replace(/\w+/g,function(a){return b[a]=c(a),f.createElement(a),'c("'+a+'")'})+");return n}")(k,f)}function j(a){var b;return a.documentShived?a:(k.shivCSS&&!e&&(b=!!g(a,"article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio{display:none}canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}mark{background:#FF0;color:#000}")),f||(b=!i(a)),b&&(a.documentShived=b),a)}var c=a.html5||{},d=/^<|^(?:button|form|map|select|textarea)$/i,e,f;(function(){var a=b.createElement("a");a.innerHTML="<xyz></xyz>",e="hidden"in a,f=a.childNodes.length==1||function(){try{b.createElement("a")}catch(a){return!0}var c=b.createDocumentFragment();return typeof c.cloneNode=="undefined"||typeof c.createDocumentFragment=="undefined"||typeof c.createElement=="undefined"}()})();var k={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:j};a.html5=k,j(b)}(this,b),e._version=d,e._domPrefixes=o,e._cssomPrefixes=n,e.testProp=function(a){return B([a])},e.testAllProps=D,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+s.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return o.call(a)=="[object Function]"}function e(a){return typeof a=="string"}function f(){}function g(a){return!a||a=="loaded"||a=="complete"||a=="uninitialized"}function h(){var a=p.shift();q=1,a?a.t?m(function(){(a.t=="c"?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){a!="img"&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l={},o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};y[c]===1&&(r=1,y[c]=[],l=b.createElement(a)),a=="object"?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),a!="img"&&(r||y[c]===2?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i(b=="c"?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),p.length==1&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&o.call(a.opera)=="[object Opera]",l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return o.call(a)=="[object Array]"},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,i){var j=b(a),l=j.autoCallback;j.url.split(".").pop().split("?").shift(),j.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]||h),j.instead?j.instead(a,e,f,g,i):(y[j.url]?j.noexec=!0:y[j.url]=1,f.load(j.url,j.forceCSS||!j.forceJS&&"css"==j.url.split(".").pop().split("?").shift()?"c":c,j.noexec,j.attrs,j.timeout),(d(e)||d(l))&&f.load(function(){k(),e&&e(j.origUrl,i,g),l&&l(j.origUrl,i,g),y[j.url]=2})))}function i(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var j,l,m=this.yepnope.loader;if(e(a))g(a,0,m,0);else if(w(a))for(j=0;j<a.length;j++)l=a[j],e(l)?g(l,0,m,0):w(l)?B(l):Object(l)===l&&i(l,m);else Object(a)===a&&i(a,m)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,b.readyState==null&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};
    
    ;window.Modernizr=function(a,b,c){function x(a){j.cssText=a}function y(a,b){return x(prefixes.join(a+";")+(b||""))}function z(a,b){return typeof a===b}function A(a,b){return!!~(""+a).indexOf(b)}function B(a,b){for(var d in a)if(j[a[d]]!==c)return b=="pfx"?a[d]:!0;return!1}function C(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:z(f,"function")?f.bind(d||b):f}return!1}function D(a,b,c){var d=a.charAt(0).toUpperCase()+a.substr(1),e=(a+" "+n.join(d+" ")+d).split(" ");return z(b,"string")||z(b,"undefined")?B(e,b):(e=(a+" "+o.join(d+" ")+d).split(" "),C(e,b,c))}var d="2.5.3",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m="Webkit Moz O ms",n=m.split(" "),o=m.toLowerCase().split(" "),p={},q={},r={},s=[],t=s.slice,u,v={}.hasOwnProperty,w;!z(v,"undefined")&&!z(v.call,"undefined")?w=function(a,b){return v.call(a,b)}:w=function(a,b){return b in a&&z(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=t.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(t.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(t.call(arguments)))};return e}),p.cssanimations=function(){return D("animationName")},p.csstransitions=function(){return D("transition")};for(var E in p)w(p,E)&&(u=E.toLowerCase(),e[u]=p[E](),s.push((e[u]?"":"no-")+u));return x(""),i=k=null,function(a,b){function g(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function h(){var a=k.elements;return typeof a=="string"?a.split(" "):a}function i(a){var b={},c=a.createElement,e=a.createDocumentFragment,f=e();a.createElement=function(a){var e=(b[a]||(b[a]=c(a))).cloneNode();return k.shivMethods&&e.canHaveChildren&&!d.test(a)?f.appendChild(e):e},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+h().join().replace(/\w+/g,function(a){return b[a]=c(a),f.createElement(a),'c("'+a+'")'})+");return n}")(k,f)}function j(a){var b;return a.documentShived?a:(k.shivCSS&&!e&&(b=!!g(a,"article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio{display:none}canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}mark{background:#FF0;color:#000}")),f||(b=!i(a)),b&&(a.documentShived=b),a)}var c=a.html5||{},d=/^<|^(?:button|form|map|select|textarea)$/i,e,f;(function(){var a=b.createElement("a");a.innerHTML="<xyz></xyz>",e="hidden"in a,f=a.childNodes.length==1||function(){try{b.createElement("a")}catch(a){return!0}var c=b.createDocumentFragment();return typeof c.cloneNode=="undefined"||typeof c.createDocumentFragment=="undefined"||typeof c.createElement=="undefined"}()})();var k={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:j};a.html5=k,j(b)}(this,b),e._version=d,e._domPrefixes=o,e._cssomPrefixes=n,e.testProp=function(a){return B([a])},e.testAllProps=D,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+s.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return o.call(a)=="[object Function]"}function e(a){return typeof a=="string"}function f(){}function g(a){return!a||a=="loaded"||a=="complete"||a=="uninitialized"}function h(){var a=p.shift();q=1,a?a.t?m(function(){(a.t=="c"?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){a!="img"&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l={},o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};y[c]===1&&(r=1,y[c]=[],l=b.createElement(a)),a=="object"?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),a!="img"&&(r||y[c]===2?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i(b=="c"?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),p.length==1&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&o.call(a.opera)=="[object Opera]",l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return o.call(a)=="[object Array]"},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,i){var j=b(a),l=j.autoCallback;j.url.split(".").pop().split("?").shift(),j.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]||h),j.instead?j.instead(a,e,f,g,i):(y[j.url]?j.noexec=!0:y[j.url]=1,f.load(j.url,j.forceCSS||!j.forceJS&&"css"==j.url.split(".").pop().split("?").shift()?"c":c,j.noexec,j.attrs,j.timeout),(d(e)||d(l))&&f.load(function(){k(),e&&e(j.origUrl,i,g),l&&l(j.origUrl,i,g),y[j.url]=2})))}function i(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var j,l,m=this.yepnope.loader;if(e(a))g(a,0,m,0);else if(w(a))for(j=0;j<a.length;j++)l=a[j],e(l)?g(l,0,m,0):w(l)?B(l):Object(l)===l&&i(l,m);else Object(a)===a&&i(a,m)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,b.readyState==null&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};
    
    (function ($, undefined) {
    
        $.Slider = function (options, element) {
            this.$el = $(element);
            this._init(options);
            
        };
    
        $.Slider.defaults = {
            width:1170, //Max slider width
            height:500, //max slider height
            current: 0, // index of current slide
            bgincrement: 100, // increment the bg position (parallax effect) when sliding
            autoplay: true, // slideshow on / off
            interval: 6000 // time between transitions
        };
    
        $.Slider.prototype = {
                _init: function (options) {
                var  self = this;
                this.options = $.extend(true, {}, $.Slider.defaults, options);
                this.ratio = this.$el.width() / this.$el.height();
                this.$slides = this.$el.children().children('.da-slide');
                this.slidesCount = this.$slides.length;
    
                this.current = this.options.current;
    
                if (this.current < 0 || this.current >= this.slidesCount) {
    
                    this.current = 0;
    
                }
    
                this.$slides.eq(this.current).addClass('da-slide-current');
    
                var $navigation = $('<nav class="da-dots"/>');
                for (var i = 0; i < this.slidesCount; ++i) {
    
                    $navigation.append('<span/>');
    
                }
                $navigation.appendTo(this.$el);
    
                this.$pages = this.$el.find('nav.da-dots > span');
                this.$navNext = this.$el.find('span.da-arrows-next');
                this.$navPrev = this.$el.find('span.da-arrows-prev');
    
                this.isAnimating = false;
    
                this.bgpositer = 0;
                
    
                this.cssAnimations = Modernizr.cssanimations;
                this.cssTransitions = Modernizr.csstransitions;
    
                if (!this.cssAnimations || !this.cssAnimations) {
    
                    this.$el.addClass('da-slider-fb');
    
                }
    
                this._updatePage();
    
                // load the events
                this._loadEvents();
    
                // slideshow
                if (this.options.autoplay) {
    
                    this._startSlideshow();
    
                }
                $(window).bind('resize', function() {
                setTimeout(function() {
                        self._makeResponsive();
                    }, 150);
                });
            this._makeResponsive();
    
            },
            _navigate: function (page, dir) {
    
                var $current = this.$slides.eq(this.current),
                    $next, _self = this;
    
                if (this.current === page || this.isAnimating) return false;
    
                this.isAnimating = true;
    
                // check dir
                var classTo, classFrom, d;
    
                if (!dir) {
    
                    (page > this.current) ? d = 'next' : d = 'prev';
    
                } else {
    
                    d = dir;
    
                }
    
                if (this.cssAnimations && this.cssAnimations) {
    
                    if (d === 'next') {
    
                        classTo = 'da-slide-toleft';
                        classFrom = 'da-slide-fromright';
                        ++this.bgpositer;
    
                    } else {
    
                        classTo = 'da-slide-toright';
                        classFrom = 'da-slide-fromleft';
                        --this.bgpositer;
    
                    }
    
                    this.$el.css('background-position', this.bgpositer * this.options.bgincrement + '% center');
                }
    
                this.current = page;
    
                $next = this.$slides.eq(this.current);
    
                if (this.cssAnimations && this.cssAnimations) {
    
                    var rmClasses = 'da-slide-toleft da-slide-toright da-slide-fromleft da-slide-fromright';
                    $current.removeClass(rmClasses);
                    $next.removeClass(rmClasses);
    
                    $current.addClass(classTo);
                    $next.addClass(classFrom);
    
                    $current.removeClass('da-slide-current');
                    $next.addClass('da-slide-current');
    
                }
    
                // fallback
                if (!this.cssAnimations || !this.cssAnimations) {
                    $next.addClass('da-slide-current');
                    $next.css('left', (d === 'next') ? '100%' : '-100%').stop().animate({
                        left: '0%'
                    }, 1000, function () {
                        _self.isAnimating = false;
    
                    });
    
                    $current.stop().animate({
                        left: (d === 'next') ? '-100%' : '100%'
                    }, 1000, function () {
                        $current.removeClass('da-slide-current');                    
                    });
    
                }
    
                this._updatePage();
    
            },
            _updatePage: function () {
    
                this.$pages.removeClass('da-dots-current');
                this.$pages.eq(this.current).addClass('da-dots-current');
    
            },
            _startSlideshow: function () {
    
                var _self = this;
    
                this.slideshow = setTimeout(function () {
    
                    var page = (_self.current < _self.slidesCount - 1) ? page = _self.current + 1 : page = 0;
                    _self._navigate(page, 'next');
    
                    if (_self.options.autoplay) {
    
                        _self._startSlideshow();
    
                    }
    
                }, this.options.interval);
    
            },
            page: function (idx) {
                if (idx >= this.slidesCount || idx < 0) {
                    return false;
                }
    
                if (this.options.autoplay) {
                    clearTimeout(this.slideshow);
                    this.options.autoplay = false;
                }
    
                this._navigate(idx);
    
            },
            _makeResponsive: function () {
    
                var _self = this;
                    
                var w = this.$el.width();
                var h = this.$el.height();
                var nH = h;
                if(w < _self.options.width){
                var xy = this.options.width / this.options.height;
                var nH = w / xy;
                    this.$el.height(Math.ceil(nH));
                    
                }else{
                    this.$el.height(Math.ceil(this.options.height));
                }
            },
            _loadEvents: function () {
    
                var _self = this;
    
                this.$pages.on('click.cslider', function (event) {
    
                    _self.page($(this).index());
                    return false;
    
                });
    
                this.$navNext.on('click.cslider', function (event) {
    
                    if (_self.options.autoplay) {
    
                        clearTimeout(_self.slideshow);
                        _self.options.autoplay = false;
    
                    }
    
                    var page = (_self.current < _self.slidesCount - 1) ? page = _self.current + 1 : page = 0;
                    _self._navigate(page, 'next');
                    return false;
    
                });
    
                this.$navPrev.on('click.cslider', function (event) {
    
                    if (_self.options.autoplay) {
    
                        clearTimeout(_self.slideshow);
                        _self.options.autoplay = false;
    
                    }
    
                    var page = (_self.current > 0) ? page = _self.current - 1 : page = _self.slidesCount - 1;
                    _self._navigate(page, 'prev');
                    return false;
    
                });
    
                if (this.cssTransitions) {
    
                    if (!this.options.bgincrement) {
    
                        this.$el.on('webkitAnimationEnd.cslider animationend.cslider OAnimationEnd.cslider', function (event) {
    
                            if (event.originalEvent.animationName === 'toRightAnim4' || event.originalEvent.animationName === 'toLeftAnim4') {
    
                                _self.isAnimating = false;
    
                            }
    
                        });
    
                    } else {
    
                        this.$el.on('webkitTransitionEnd.cslider transitionend.cslider OTransitionEnd.cslider', function (event) {
    
                            if (event.target.id === _self.$el.attr('id'))
                                _self.isAnimating = false;
    
                        });
    
                    }
    
                }
    
            }
        };
    
        var logError = function (message) {
            if (this.console) {
                console.error(message);
            }
        };
    
        $.fn.cslider = function (options) {
    
            if (typeof options === 'string') {
    
                var args = Array.prototype.slice.call(arguments, 1);
    
                this.each(function () {
    
                    var instance = $.data(this, 'cslider');
    
                    if (!instance) {
                        logError("cannot call methods on cslider prior to initialization; " +
                            "attempted to call method '" + options + "'");
                        return;
                    }
    
                    if (!$.isFunction(instance[options]) || options.charAt(0) === "_") {
                        logError("no such method '" + options + "' for cslider instance");
                        return;
                    }
    
                    instance[options].apply(instance, args);
    
                });
    
            } else {
    
                this.each(function () {
    
                    var instance = $.data(this, 'cslider');
                    if (!instance) {
                        $.data(this, 'cslider', new $.Slider(options, this));
                    }
                });
    
            }
    
            return this;
    
        };
    
    })(jQuery);
    
    
    jQuery(document).ready(function ($) {
        var lastId,
        topMenu = $("#top-navigation"),
        topMenuHeight = topMenu.outerHeight(),
            // All list items
            menuItems = topMenu.find("a"),
            // Anchors corresponding to menu items
            scrollItems = menuItems.map(function () {
                var href = $(this).attr("href");
                if(href.indexOf("#") === 0){
                    var item = $($(this).attr("href"));
                    if (item.length) {
                        return item;
                    }
                }
            });
        var containerWidth = $('.section .container').width();
        $('#da-slider').cslider();
        $('#clint-slider').bxSlider({
            pager: false,
            minSlides: 1,
            maxSlides: 5,
            moveSlides: 2,
            slideWidth: 210,
            slideMargin: 25,
            prevSelector: $('#client-prev'),
            nextSelector: $('#client-next'),
            prevText: '<i class="icon-left-open"></i>',
            nextText: '<i class="icon-right-open"></i>'
        });
    });
    </script>
    
    2.jpg

    这个说实话,是我最喜欢的轮播方式之一,这是寻找的轮播插件,因为我喜欢,所以我愿意分享给大家,希望能够给各种刚刚入行的前端伙伴一种学习的机会。

    相关文章

      网友评论

        本文标题:从右向左轮播文字及图片功能

        本文链接:https://www.haomeiwen.com/subject/wcthtftx.html