Home  >  Article  >  Web Front-end  >  移动端iframe用fixed有问题._html/css_WEB-ITnose

移动端iframe用fixed有问题._html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:41:281101browse

做移动端,底部有一个菜单,是用的iframe引用的,然后对iframe定位用fixed或者用了fixed的元素包含了iframe,在手机上都看不到元素.比如

		<div style="position: fixed;left: 0px;bottom: 0px;height:100px;width: 100%;background-color: red;">			<iframe src="blue.html" frameborder="0" width="100px" height="500px"></iframe>		</div>
在手机什么显示都没有,但是
		<div style="position: fixed;left: 0px;bottom: 0px;height:100px;width: 100%;background-color: red;">		</div>
则显示了红色的方框的,这个是兼容性问题吗?该怎么解决?


回复讨论(解决方案)

求大神指导啊!!!

问题和

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />

这句话有关.删了就可以了这是为什么?

又经过测试..只有魅族手机不显示,

兼容无关,代码有缺陷。。。。

兼容无关,代码有缺陷。。。。

能说具体点不?

你在css中加入html{margin:0;padding:0;border:0;}还会出现红框吗???

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn