我在网页中包含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中,一切都按预期运行。
您需要src中的http协议来使用chrome
<iframe class="aftermovie" width="800" height="450" src="http://www.youtube.com/embed/B4bb69Moff8?rel=0" frameborder="0" allowfullscreen></iframe>