swiper实现三维立体带阴影幻灯片slide效果代码

代码语言:html

所属分类:幻灯片

代码描述:swiper实现三维立体带阴影幻灯片slide效果代码

代码标签: swiper三维 立体 阴影 幻灯片 slide

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/swiper.5.3.8.css">
    <style>
        .swiper-pagination-bullet {
            border: 1px solid #1da1f2
        }
        
        .swiper-pagination-bullet-active {
            background: #1da1f2
        }
        
        img:not([draggable]),embed,object,video {
            max-width: 100%;
            height: auto
        }
        
        .swiper-container {
            margin-left: auto;
            margin-right: auto;
            position: relative;
            overflow: hidden;
            z-index: 1
        }
        
        .swiper-container-no-flexbox .swiper-slide {
            float: left
        }
        
        .swiper-container-vertical>.swiper-wrapper {
            flex-direction: column
        }
        
        .swiper-wrapper {
            position: relative;
            width: 100%;
            height: 100%;
            z-index: 1;
            display: flex;
            transition-property: transform;
            box-sizing: content-box
        }
        
        .swiper-container-android .swiper-slide,.swiper-wrapper {
            transform: translate3d(0,0,0)
        }
        
        .swiper-container-multirow>.swiper-wrapper {
            -webkit-box-lines: multiple;
            -moz-box-lines: multiple;
            flex-wrap: wrap
        }
        
        .swiper-container-free-mode>.swiper-wrapper {
            transition-timing-function: ease-out;
            margin: 0 auto
        }
        
        .swiper-slide {
            -webkit-flex-shrink: 0;
            -ms-flex: 0 0 auto;
            flex-shrink: 0;
            width: 100%;
            height: 100%;
            position: relative
        }
        
        .swiper-container-autoheight,.swiper-container-autoheight .swiper-slide {
            height: auto
        }
        
        .swiper-container-autoheight .swiper-wrapper {
            align-items: flex-start;
            transition-property: transform,height
        }
        
        .swiper-container .swiper-notification {
            position: absolute;
            left: 0;
            top: 0;
            pointer-events: none;
            opacity: 0;
            z-index: -1000
        }
        
        .swiper-wp8-horizontal {
            touch-action: pan-y
        }
        
        .swiper-wp8-vertical {
            touch-action: pan-x
        }
        
        .swiper-button-next,.swiper-button-prev {
            position: absolute;
            top: 50%;
            width: 27px;
            height: 44px;
            margin-top: -22px;
            z-index: 10;
            cursor: pointer;
            background-size: 27px 44px;
            background-position: center;
            background-repeat: no-repeat
        }
        
        .swiper-button-next.swiper-button-disabled,.swiper-button-prev.swiper-button-disabled {
            opacity: .35;
            cursor: auto;
            pointer-events: none
        }
        
        .swiper-button-prev,.swiper-container-rtl .swiper-button-next {
            background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");
            left: 10px;
            right: auto
        }
        
        .swiper-button-prev.swiper-button-black,.swiper-container-rtl .swiper-button-next.swiper-button-black {
            background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E")
        }
        
        .swiper-button-prev.swiper-button-white,.swiper-container-rtl .swiper-button-next.swiper-button-white {
            background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")
        }
        
        .swiper-button-next,.swiper-container-rtl .swiper-button-prev {
            background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");
            right: 10px;
            left: auto
        }
        
        .swiper-button-next.swiper-button-black,.swiper-container-rtl .swiper-button-prev.swiper-button-black {
            background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E")
        }
        
        .swiper-button-next.swiper-button-white,.swiper-container-rtl .swiper-button-prev.swiper-button-white {
            background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")
        }
        
        .swiper-pagination {
            position: absolute;
            text-align: center;
            transition: .3s;
            transform: translate3d(0,0,0);
            z-index: 10
        }
        
        .swiper-pagination.swiper-pagination-hidden {
            opacity: 0
        }
        
        .swiper-container-horizontal>.swiper-pagination-bullets,.swiper-pagination-custom,.swiper-pagination-fraction {
            bottom: 10px;
            left: 0;
            width: 100%
        }
        
        .swiper-pagination-bullet {
            width: 8px;
            height: 8px;
            display: inline-block;
            border-radius: 100%;
            background: #000;
            opacity: .2
        }
        
        button.swiper-pagination-bullet {
            border: 0;
            margin: 0;
            padding: 0;
            box-shadow: none;
            -moz-appearance: none;
            -webkit-appearance: none;
            appearance: none
        }
        
        .swiper-pagination-clickable .swiper-pagination-bullet {
            cursor: pointer
        }
        
        .swiper-pagination-white .swiper-pagination-bullet {
            background: #fff
        }
        
        .swiper-pagination-bullet-active {
            opacity: 1;
            background: #007aff
        }
        
        .swiper-pagination-white .swiper-pagination-bullet-active {
            background: #fff
        }
        
        .swiper-pagination-black .swiper-pagination-bullet-active {
            background: #000
        }
        
        .swiper-container-vertical>.swiper-pagination-bullets {
            right: 10px;
            top: 50%;
            transform: translate3d(0,-50%,0)
        }
        
        .swiper-container-vertical>.swiper-pagination-bullets .swiper-pagination-bullet {
            margin: 5px 0;
            display: block
        }
        
        .swiper-container-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet {
            margin: 0 5px
        }
        
        .swiper-pagination-progress {
            background: rgba(0,0,0,.25);
            position: absolute
        }
        
        .swiper-pagination-progress .swiper-pagination-progressbar {
            background: #007aff;
            position: absolute;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            transform: scale(0);
            transform-origin: left top
        }
        
        .swiper-container-rtl .swiper-pagination-progress .swiper-pagination-progressbar {
            transform-origin: right top
        }
        
        .swiper-container-horizontal>.swiper-pagination-progress {
            width: 100%;
            height: 4px;
            left: 0;
            top: 0
        }
        
        .swiper-container-vertical>.swiper-pagination-progress {
            width: 4px;
            height: 100%;
            left: 0;
            top: 0
        }
        
        .swiper-pagination-progress.swiper-pagination-white {
            background: rgba(255,255,255,.5)
        }
        
        .swiper-pagination-progress.swiper-pagination-white .swiper-pagination-progressbar {
            background: #fff
        }
        
        .swiper-pagination-progress.swiper-pagination-black .swiper-pagination-progressbar {
            background: #000
        }
        
        .swiper-container-3d {
            -o-perspective: 1200px;
            perspective: 1200px
        }
        
        .swiper-container-3d .swiper-cube-shadow,.swiper-container-3d .swiper-slide,.swiper-container-3d .swiper-slide-shadow-bottom,.swiper-container-3d .swiper-slide-shadow-left,.swiper-container-3d .swiper-slide-shadow-right,.swiper-container-3d .swiper-slide-shadow-top,.swiper-container-3d .swiper-wrapper {
            transform-style: preserve-3d
        }
        
        .swiper-container-3d .swiper-slide-shadow-bottom,.swiper-container-3d .swiper-slide-shadow-left,.swiper-container-3d .swiper-slide-shadow-right,.swiper-container-3d .swiper-slide-shadow-top {
            position: absolute;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 10
        }
        
        .swiper-container-3d .swiper-slide-shadow-left {
            background-image: linear-gradient(to left,rgba(0,0,0,.5),rgba(0,0,0,0))
        }
        
        .swiper-container-3d .swiper-slide-shadow-right {
            background-image: linear-gradient(to right,rgba(0,0,0,.5),rgba(0,0,0,0))
        }
        
        .swiper-container-3d .swiper-slide-shadow-top {
            background-image: linear-gradient(to top,rgba(0,0,0,.5),rgba(0,0,0,0))
        }
        
        .swiper-container-3d .swiper-slide-shadow-bottom {
            background-image: linear-gradient(to bottom,rgba(0,0,0,.5),rgba(0,0,0,0))
        }
        
        .swiper-container-coverflow .swiper-wrapper,.swiper-container-flip .swiper-wrapper {
            -ms-perspective: 1200px
        }
        
        .swiper-container-cube,.swiper-container-flip {
            overflow: visible
        }
        
        .swiper-container-cube .swiper-slide,.swiper-container-flip .swiper-slide {
            pointer-events: none;
            -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
            z-index: 1
        }
        
        .swiper-container-cube .swiper-slide .swiper-slide,.swiper-container-flip .swiper-slide .swiper-slide {
            pointer-events: none
        }
        
        .swiper-container-cube .swiper-slide-active,.swiper-container-cube .swiper-slide-active .swiper-slide-active,.swiper-container-flip .swiper-slide-active,.swiper-container-flip .swiper-slide-active .swiper-slide-active {
            pointer-events: auto
        }
        
        .swiper-container-cube .swiper-slide-shadow-bottom,.swiper-container-cube .swiper-slide-shadow-left,.swiper-container-cube .swiper-slide-shadow-right,.swiper-container-cube .swiper-slide-shadow-top,.swiper-container-flip .swiper-slide-shadow-bottom,.swiper-container-flip .swiper-slide-shadow-left,.swiper-container-flip .swiper-slide-shadow-right,..........完整代码请登录后点击上方下载按钮下载查看

网友评论0