点击图片打开视频弹窗播放视频

2020-09-02  本文已影响0人  zZ_d205

实现效果


image
<!doctype html>

<html lang="en">

<meta charset="UTF-8">

<meta name="viewport"

      content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">

<meta http-equiv="X-UA-Compatible" content="ie=edge">

<link rel="stylesheet" type="text/css" href="css/jquery.fancybox.min.css" />

<title>Document</title>
<body>
    <div class="video-link">

        <a href="http://bswqh.cn/Uploads/Video/Index/1.mp4"

           class="theme-btn lightbox-image"><img src="images/video.png" alt="">

            <div class="subtitle">黄芪介绍视频</div>

            <h1 class="title">正北芪</h1>


        </a>
    </div>
    <script src="js/jquery.min.js"></script>

    <script src="js/jquery.fancybox.js"></script>

    <script src="js/custom-script.js"  type="text/javascript"  charset="utf-8"></script>
</body>



</html>

移动端样式修改

.fancybox-slide video{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    max-width: 100%;
    padding: 0;
}

百度网盘资源:

链接:https://pan.baidu.com/s/1oSCMhMw8Tsc-xO5FEzLR3A

提取码:7sto

上一篇下一篇

猜你喜欢

热点阅读