如何在ifime中的vimeo,youtube视频中激活全屏标志

时间:2016-03-01 09:15:59

标签: html html5 iframe youtube vimeo

我有一个包含vimeo视频的iframe如何在该视频中激活全屏旗帜

以下是包含视频的iframe的HTML。

<iframe width="500" height="281" frameborder="0" src="https://player.vimeo.com/video/155984146?color=ececec&amp;title=0&amp;byline=0&amp;portrait=0;"></iframe>

2 个答案:

答案 0 :(得分:2)

只需使用

 allowfullscreen="allowfullscreen" mozallowfullscreen="mozallowfullscreen" msallowfullscreen="msallowfullscreen" oallowfullscreen="oallowfullscreen" webkitallowfullscreen="webkitallowfullscreen"
在你的iframe标签下,它就像这样

<iframe width="500" height="281" src="https://player.vimeo.com/video/155984146" allowfullscreen="allowfullscreen" mozallowfullscreen="mozallowfullscreen" msallowfullscreen="msallowfullscreen" oallowfullscreen="oallowfullscreen" webkitallowfullscreen="webkitallowfullscreen"> </iframe>

答案 1 :(得分:1)

您好,您必须在iframe上全屏显示。

只需将webkitallowfullscreen mozallowfullscreen allowfullscreen添加到你的iframe

<iframe width="500" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen src="https://player.vimeo.com/video/155984146?color=ececec&amp;title=0&amp;byline=0&amp;portrait=0;"></iframe>
相关问题