【发布时间】:2013-11-18 04:33:00
【问题描述】:
我的 iFrame 没有以移动设备为中心。我必须将宽度定义为 1250 像素,否则它只会在桌面上显示 iFrame 的一小部分。我真的需要黑边在手机屏幕上消失...
http://www.howlatthemoon.com/birthday-parties-chicago
(我必须使用 iFrame,因为我的 CMS 已经过时了,它不适用于此代码。我只会隐藏边缘的黑色渐变,但 CMS 不会响应媒体查询)
iframe, object, embed {
max-width: 100%;
}
#midslide {
clear:right;
margin-top: -47px;
position: relative;
overflow: auto;
margin-left: auto !important;
margin-right: auto !important;
width:1250px;
height:338px;
}
.center{
margin-left: auto;
margin-right: auto;
display: block;
width: 100%;
}
<iframe scrolling="no" frameborder="0" id="midslide" align="middle" src="http://www.howlatthemoon.com/images/howl/landing/birthday-parties/slider2.html"></iframe>
感谢任何可以提供帮助的人!
【问题讨论】:
标签: jquery html css mobile iframe