【发布时间】:2014-10-21 08:41:59
【问题描述】:
我正在开发一个响应式网站,最近通过使用 http://embedresponsively.com/ 的嵌入代码设法让 vimeo 剪辑变得响应式。
唯一的问题是,当我尝试让一个 div 漂浮在嵌入式 iframe 旁边时,Vimeo 电影会消失吗?并且 div 也不会显示在包装器中的 iframe 旁边。
有人知道如何在不使用浮动或内联块的情况下强制 div 显示在 iframe 旁边(右侧),因为这不起作用(?)同时保持缩放/响应效果vimeo 电影?
提前谢谢你!
HTML:
<body>
<div class="case_wrapper">
<div class="movie_wrapper">
<div class='embed-container'>
<iframe src='http://player.vimeo.com/video/18085160' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen>
</iframe>
</div>
</div>
<div class="movie_info"></div>
</div>
</body>
CSS:
.case_wrapper {
width:1200px;
height:500px;
background:#5340AA;
}
.movie_wrapper {
max-width:860px;
max-height:500px;
}
.movie_info {
width:300px;
height:500px;
margin-left:40px;
background:#53FF00;
}
.embed-container {
position: relative;
padding-bottom: 56.25%;
height: 0;
overflow: hidden;
max-width: 100%;
height: auto;
}
.embed-container iframe, .embed-container object, .embed-container embed {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
【问题讨论】:
-
不能使用表格吗?
-
无论如何,如果你知道如何解决这个问题?
标签: html css iframe responsive-design vimeo