如何弹出jquery窗口播放vimeo / youtube视频? [英] how to popup jquery window to play vimeo/youtube video?

查看:166
本文介绍了如何弹出jquery窗口播放vimeo / youtube视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为iPhone应用程序构建着陆页,并且我希望为我们的页面添加视频模式窗口。它与 https://path.com/ 非常相似。



我发现此网页Popup Jquery window to play youtube,但我不知道如何减小视频的大小(我不希望它播放全屏)。

解决方案

轻松使用诸如 colorbox

您需要添加 JQuery ,然后将colorbox脚本添加到您的html页面,
然后

 < a href =your_youtube_linkclass =video_layer>玩我< / a> 
< script>
$('。video_layer')。colorbox({iframe:true});
< / script>

从youtube视频下方的嵌入标签中获取YouTube链接,您可以在其中设置宽度和框架的高度。

I'm building the landing page for an iPhone app, and i would like to add a video modal window to our page. It would be very similar to: https://path.com/ .

I found this page "Popup Jquery window to play youtube" but i don't know how to decrease the size of the video (I don't want it playing full screen).

解决方案

It's easy to use something like colorbox
You need to add JQuery followed by colorbox scripts to your html page, then

<a href="your_youtube_link" class="video_layer">play me</a>
<script>
$('.video_layer').colorbox({iframe:true});
</script>

Get the youtube link from the embedding tab below the video on youtube, you can set there the width and height of the frame.

这篇关于如何弹出jquery窗口播放vimeo / youtube视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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