喜欢colorbox的效果,作者主页:
用colorbox播放其他域名的图片都是没问题的,但是用以下3种方式都不能播放其他域名的视频,
作者主页上也只有播放youtube和Vimeo视频的办法,其他域名时均无法播放~
以下3种视频的播放方式均显示:www.w3schools.com 已拒绝连接,或This content failed to load.。
<link href="https://www.feti072.com/inc/js/jquery.color-box/colorbox.css" rel="stylesheet" />
<script type="text/javascript" src="https://www.feti072.com/inc/js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="https://www.feti072.com/inc/js/jquery.color-box/jquery.colorbox.js"></script>
<h4>一组图片</h4>
<p><a class="group1" href="https://www.shadowbox-js.com/gallery/mustang/red.jpg">图 1</a></p>
<p><a class="group1" href="https://www.shadowbox-js.com/gallery/mustang/blue.jpg">图 2</a></p>
<p><a class="group1" href="https://www.shadowbox-js.com/gallery/mustang/grey.jpg">图 3</a></p>
<script>
$(document).ready(function(){
$(".group1").colorbox({rel:'group1'});
});
</script>
<h4>外站MP4方式1</h4>
<a class="lightboxed" href="http://www.w3schools.com/html/mov_bbb.mp4">播放</a>
<script>
$('a.lightboxed').colorbox({iframe:true, width:"80%", height:"80%"});
</script>
<br>
<h4>外站MP4方式2,模拟作者youtube视频写法</h4>
<a class='youtube cboxElement' href="http://www.w3schools.com/html/mov_bbb.mp4">播放</a>
<script>
$(".youtube").colorbox({iframe:true, innerWidth:640, innerHeight:390});
</script>
<br>
<h4>外站MP4方式3,模拟作者的Outside写法</h4>
<a class='iframe cboxElement' href="http://www.w3schools.com/html/mov_bbb.mp4">播放</a>
</body>
</html>
有熟悉colorbox的请指点一下啊!