twitter-bootstrap 如何使用实际使用跨度来嵌入带有 Twitter 引导程序的视频?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/16660077/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 17:10:12  来源:igfitidea点击:

How to use actually use span to embed videos with twitter bootstrap?

cssiframetwitter-bootstrap

提问by user428900

I need to embed a youtube clip within a webpage and I use twitter bootstrap. How does one correctly actually use span correctly to embed the video?

我需要在网页中嵌入一个 youtube 剪辑,我使用 twitter bootstrap。如何正确地实际使用跨度来嵌入视频?

There are so many resolutions out there! For example, if I choose span8 for the video - it would be ~620 pixels wide iframe video. This may be an issue with even smaller resolutions.

那里有很多决议!例如,如果我为视频选择 span8 - 它将是 ~620 像素宽的 iframe 视频。这可能是更小的分辨率的问题。

回答by Bass Jobsen

Set the width and height of the iframe relative to (100%) the containing div span*. Choose a span width which fits your design. If you enable the responsive features of twitter bootstrap, see: http://twitter.github.io/bootstrap/scaffolding.html#responsivethe width of your span and so the iframe change with the resolution.

设置 iframe 相对于 (100%) 包含的宽度和高度div span*。选择适合您设计的跨度宽度。如果您启用 twitter bootstrap 的响应功能,请参阅:http: //twitter.github.io/bootstrap/scaffolding.html#responsive跨度的宽度,因此 iframe 会随着分辨率而变化。

https://stackoverflow.com/a/12235638/1596547shows how to make the size of the iframe responsive.

https://stackoverflow.com/a/12235638/1596547展示了如何使 iframe 的大小响应。

Example see: http://bootply.com/BassJobsen/61833

示例见:http: //bootply.com/BassJobsen/61833