包含youtube视频不起作用

时间:2013-11-27 21:48:10

标签: php html youtube

我在网页中加入了Youtube视频,这是代码:

 <div id="content">
    <iframe class="aftermovie" width="800" height="450" src="//www.youtube.com/
embed/vjFA_UNSl9c?rel=0" frameborder="0" allowfullscreen>
    </iframe>
 </div>

该网站正在 localhost 中运行,当我使用Chrome浏览器查看我看到视频但无法执行任何操作的页面时,在Firefox中,所有内容都按预期运行。

1 个答案:

答案 0 :(得分:-1)

你需要在src中使用http协议才能使用chrome

<iframe class="aftermovie" width="800" height="450" src="http://www.youtube.com/embed/B4bb69Moff8?rel=0" frameborder="0" allowfullscreen></iframe>
相关问题