【发布时间】:2013-08-20 04:10:52
【问题描述】:
我目前正在我的网站上创建一个页面,其中放置了一个导航栏(浮动:右)和一个导航栏(浮动:左),但是每当我尝试嵌入 youtube 视频时,右导航栏就会结束在页面底部。有谁知道我可以使用什么 css 代码来解决这个问题?这是我目前拥有的: html:
<div class="video-wrapper">
<iframe width="700" height="525" src="http://www.youtube.com/embed/MYN5aBPmpZE?rel=0" frameborder="0" allowfullscreen></iframe>
</div>
CSS:
.videoWrapper {
position: relative;
padding-bottom: 56.25%; /* 16:9 */
padding-top: 25px;
height: 0;
}
.videoWrapper iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
【问题讨论】:
-
[this][1] 讨论应该对您有所帮助。 [1]:stackoverflow.com/questions/18282318/…
标签: html css youtube css-float