如何使视频播放器的宽度和高度可变? [英] how to make video player fluid width and height?

查看:407
本文介绍了如何使视频播放器的宽度和高度可变?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您如何将这些视频播放器的高度和宽度设置为100%,并调整页面大小 http://scripts.reloadlab.net/customYtPlayer/

how would you make these video players height and width 100% and resize with the page http://scripts.reloadlab.net/customYtPlayer/

<a class="youtube" href="http://www.youtube.com/watch?v=CD2LRROpph0" style="width: 100%;"></a>

使视频播放器具有窗口的宽度,并在调整其大小时保持该宽度,而我希望它随窗口调整大小.并且您不能指定高度,但我也希望在调整窗口大小时可以随窗口调整高度.

makes the video player the width of the window and it remains that way when resizing it whereas i want it to be resizable with the window. and you cant specify height but i would also like that to be resizeable with the window when resizing it.

推荐答案

您可以使用fitvids.js,这是一个响应式jQuery插件,用于视频宽度视频 http://fitvidsjs.com/

You could use fitvids.js, a responsive jQuery plugin for fluid width video http://fitvidsjs.com/

这篇关于如何使视频播放器的宽度和高度可变?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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