【发布时间】:2013-01-29 11:21:24
【问题描述】:
我需要在 iframe 中从顶部隐藏 300 像素。我试图用溢出隐藏它:隐藏在 css 中,但它在 iphone 或 ipad 中不起作用。我该如何解决?
我的 HTML 代码
<div class="iframe-wrapper">
<div class="iframe-content">
<iframe src="http://my_url" width="940" height="900" frameborder="0" scrolling="no" </iframe>
</div>
</div>
我的 CSS
.iframe-wrapper {
position: relative;
overflow: hidden;
width: 940px;
height: 600px;
}
.iframe-content {
position: absolute;
top: -300px;
}
【问题讨论】:
-
你试过给
.iframe-content一个宽度和高度等于它里面的iframe吗?
标签: iphone html css ipad iframe