为什么我的fancybox插件不能用于我的youtube链接? [英] Why is my fancybox plugin not working for my youtube link?

查看:103
本文介绍了为什么我的fancybox插件不能用于我的youtube链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法弄清楚为什么它无法加载,这似乎与他们的演示首页上的fancybox的youtube链接相同.另外,页面上的所有其他花式框都可以使用.在此处,并且无效的是每个人的吸烟视频.

I cannot figure out why it isn't loading, it seems the same as fancybox's youtube link on their demo homepage. Plus, all the other fancyboxes on the page work. It's here and the one that isn't working is everybody's smoking video.

这是我的html:

<li class="portfolio-tn">
   <a class="fancybox" title="A video I made whilst I was giving up smoking. Unfortunately the video tape reel got damaged and the film quality isn't great. " href="http://www.youtube.com/embed/NXzSX5Cbebw">
       <img alt="thumbnail of Everybody's Smoking Video" src="images/assets/other_stuff/smokingvideo_thumbnail.png">
  </a>
</li>

推荐答案

您将需要使用iframe元素嵌入来自其他域的视频.

You will need to use an iframe element to embed video from a different domain.

fancybox文档说,您可以使用以下两种方法之一来实现此目的:

The fancybox docs say that you can achieve this using one of two ways:

<a href="http://www.example?iframe">This goes to iframe</a>

<a class="iframe" href="http://www.example">This goes to iframe</a>

这篇关于为什么我的fancybox插件不能用于我的youtube链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆