jquery swiper实现视频和图文混合轮播切换效果代码

代码语言:html

所属分类:幻灯片

代码描述:jquery swiper实现视频和图文混合轮播切换效果代码

代码标签: 视频 图文 混合 轮播 切换 效果

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

<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no" />
    <title></title>
    <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/jquery.1.11.min.js"></script>
    <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/swiper.4.5.1.css">
    <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/swiper.4.5.1.js"></script>
    <style>
        html,
    body {
    	width: 100%;
    	height: 100%;
    	font-family: " Microsoft YaHei";
    	position: relative;
    	font-size: 14px;
    	margin: 0;
    }
    
    a {
    	text-decoration: none;
    	outline: none;
    	-webkit-tap-highlight-color: transparent;
    }
    
    
    .case .swiper-slide img {
    	width: 100%;
    	height: 100%;
    }
    
    .swiper-container {
    	width: 100%;
    	height: 3.57rem;
    }
    
    
    .carousel {
    	margin-bottom: .13rem;
    	width: 100%;
    	height: 3.57rem;
    	position: relative;
    }
    
    .swiper-pagination-bullet {
    	background: none;
    	opacity: 1;
    	border: 1px solid #FF4C81;
    }
    
    .swiper-pagination-bullet-active {
    	background: #FF4C81;
    }
    /*��Ƶ*/
    
    .swiper-slideVideo {
    	width: 100%;
    	height: 100%;
    	position: relative;
    }
    
    .video_btn {
    	width: 0.6rem;
    	height: 0.6rem;
    	position: absolute;
    	left: 0;
    	top: 0;
    	bottom: 0;
    	right: 0;
    	margin: auto;
    }
    
    .video_btn>img {
    	width: 100%;
    	height: 100%;
    }
    
    .swiper-slideVideo>video {
    	width: 100%;
    	height: 100%;
    }
    /*ͼƬ/��Ƶ�л�*/
    
    .vAndi {
    	width: 1rem;
    	height: 0.2rem;
    	position: absolute;
    	left: 0;
    	right: 0;
    	margin: auto;
    	bottom: 0.11rem;
    	z-index: 9999;
    	display: none;
    }
    
    .vAndiCont {
    	width: 1rem;
    	height: 0.2rem;
    	display: flex;
    	align-items: center;
    	justify-content: space-between;
    }
    
    .vAndiCont>div {
    	width: 0.42rem;
    	height: 0.2rem;
    	border-radius: 0.1rem;
    	line-height: 0.2rem;
    	background: #fff;
    	color: #444444;
    	font-size: 0.09rem;
    	text-align: center;
    }
    
    .videoBtn:before {
    	content: "";
    	display: inline-block;
    	width: 0;
    	height: 0;
    	border-left: 0.07rem solid #444444;
    	border-top: 0.035rem solid transparent;
    	border-bottom: 0.035rem solid transparent;
    }
    
    .videoBtn.SWactive:before {
    	border-left: 0.07rem solid #fff;
    	border-top: 0.035rem solid transparent;
    	border-bottom: 0.035rem solid transparent;
    }
    
    .videoBtn.SWactive {
    	background: #FE3F47;
    	color: #fff;
    }
    
    .imgBtn.SWactive {
    	background: #FE3F47;
    	color: #fff;
    }
    
    .carousel .swiper-pagination {
    	font-size: 0.2rem;
    }
    
    .carousel .swiper-pagination-custom {
    	position: static !important;
    	display: inline-block;
    	background: #000;
    	float: right;
    	color: white;
    	width: 0.40rem;
    	height: 0.20rem;
    	opacity: 0.5;
    	line-height: 0.20rem;
    	margin-bottom: 0.10rem;
    	font-size: 12px;
    	border-radius: 0.1rem;
    	margin-right: 0.109rem;
    }
    </style>


    <!-- 阿里高清方案 -->
    <script>
        (function(doc, win) {
        				var docEl = doc.documentElement,
        					resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
        					recalc = function() {
        						var clientWidth = docEl.clientWidth;
        						if(!clientWidth) return;
        						docEl.style.fontSize = 100 * (clientWidth / 375) + 'px';
        					};
        				if(!doc.addEventListener) return;
        				win.addEventListener(resizeEvt, recalc, false);
        				doc.addEventListener('DOMContentLoaded', recalc, false);
        			})(document, window);
    </script>

</head>

<body onLoad="load()">
    <h2 style="text-align: center">请在移动端预览,不支持pc端</h2>
    <div id="wrapper">

        <div class="header">
            <a href="appfun:productdetail:pop" class="back iconfont icon-arrow-left "></a>
            <a href="" class="rules iconfont icon-arrow-right "></a>
        </div>
        <!--轮播-->
        <div class="carousel">
            <div class="swiper-container case">
                <div class="swiper-wrapper bsd load-div">
                    <div class="swiper-slide">
                        <div class="swiper-slideVideo">
                            <video src="//repo.bfw.wiki/bfwrepo/video/5d87423a07471.mp4" id="slideVideo&quo.........完整代码请登录后点击上方下载按钮下载查看

网友评论0