弹出层--弹框

本文介绍如何利用Colorbox插件实现网页中视频弹窗的功能。通过整合CSS、HTML及JavaScript,可以轻松创建响应式的视频播放窗口。具体步骤包括引入必要的样式文件和脚本文件,设置HTML结构,并通过jQuery调用Colorbox。

1、CSS

<link rel="stylesheet" type="text/css" href="css/colorbox.css"/>

2、HTML

<div class="flash1"><a class="video_index" href="http://www.youtube.com/embed/sAd9__yu_h0/?autoplay=1&loop=1&;controls=0&amp;showinfo=0&fmt=22"><img src="images/logo_08.png"/></a></div>

3、JS

<script type="text/javascript" src="js/jquery.colorbox-min.js"></script>

4、使用方法

$(document).ready(function(){
$(".video_index").colorbox({iframe:true, innerWidth:800, innerHeight:450});
$(".video_index1").colorbox({iframe:true, innerWidth:800, innerHeight:450});
$(".video1").colorbox({iframe:true, innerWidth:800, innerHeight:450});

}) ;

5、展示效果

 

 

效果链接 http://dnmgame.com.tw

 

转载于:https://www.cnblogs.com/xuyanjiayou/p/8377105.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值