-1

我正在流行的 BootStrap 框架上构建一个小型静态网站。不幸的是,我无法提供链接,但基本上我已经构建了一个模态框,单击按钮会下降,其中嵌入了 YouTube 视频。

它工作正常,但如果你关闭模态框,它就会消失,但 YouTube 视频会悬停在其他所有内容上,无法摆脱它。这是在 IE10 上。

有没有其他人尝试将视频嵌入到 BootStrap 模块盒中并有解决方案?

提前致谢,

杰克

编辑

好的,这是一段代码:

<a id="mediaVideo" class="btn btn-primary btn-large" href="#" data-toggle="modal" data-target="#video">Watch the interview</a>

<!-- Modal -->
<div id="video" class="modal hide fade" style="color: #2a2a2a; width: 590px;" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">This is the modal title</h3>
</div>
<div class="modal-body">
<p>Small paragraph to describe the video</p>
<iframe width="560" height="315" src="http://www.youtube.com/embed/H542nLTTbu0" frameborder="0" allowfullscreen></iframe>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Close Window</button>
<div class="btn-group">
<a class="btn btn-primary dropdown-toggle" data-toggle="dropdown" href="#">
Share This Video
<span class="caret"></span>
</a>
<ul class="dropdown-menu" align="left">
<li><a href="http://www.facebook.com/sharer.php?u=http://www.google.com">Facebook</a></li>
<li><a href="http://twitter.com/share?text=This%20is%20the%20text&url=http://www.google.com">Twitter</a></li>
<li><a href="https://plus.google.com/share?url=http://www.google.co.uk">Google+</a></li>
</ul>
</div>
</div>
</div>
<!--END MODAL-->
4

1 回答 1

0

对我来说似乎工作正常:jsFiddle。我使用的是在Google Developers<iframe>咨询 YouTube Embed API 页面时推荐的选项。

于 2013-04-09T09:25:54.520 回答