css - 自举 |两列一列 16 :9 video and some text

标签 css html twitter-bootstrap video fullscreen

我想使用 Bootstrap 实现类似的目标:

|--------------------|------| ^
|                    | Some | |
|       16/9         | Text | | 90% height
|                    |      | |
|--------------------|------| v
<--------------------------->
   width 100% (screen width)

我已经能够创建视频保持 16/9 比例的两个容器,但 Div 无法容纳剩余空间。相反,视频只是覆盖了正确的 DIV。这意味着我将添加到我的 DIV 中的文本不会居中......正如您在那里看到的那样:

enter image description here

你能帮帮我吗?

最佳答案

所以,我设法用 Javascript 做到了。一种简单的方法。

<script>

var zvHeight = (screen.availHeight/100)*80;
var zvWidth = (zvHeight/9)*16;
document.getElementById('zv').style.width = zvWidth+"px";

zpsWidth = screen.availWidth-zvWidth;
document.getElementById('zps').style.width = zpsWidth+"px";
</script>

关于css - 自举 |两列一列 16 :9 video and some text,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45793337/

相关文章:

html - 为什么我在 CSS 中的缓动过渡不起作用?

jquery - Bootstrap datetimepicker 在可滚动的 div 中无法正常工作

twitter-bootstrap - 无法在 twitter Bootstrap 中调用未定义错误的方法 'charAt'

javascript - 是否可以隐藏父元素的父元素的子元素?

css - 向左浮动,流体布局

javascript - appendTo 时不要使用 jquery 函数吗?

javascript - 限制特定对象的 hrefs 的 Javascript 修改/找出修改 hrefs 的内容

javascript - 如何在javascript中检测鼠标左键是否被按下

css - Durandal 2.0.1 中的 bootstrap 3 模态

html - HTML 中的 float 按钮