Home  >  Article  >  Web Front-end  >  There is a problem with fixed iframe on mobile terminal._html/css_WEB-ITnose

There is a problem with fixed iframe on mobile terminal._html/css_WEB-ITnose

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

For the mobile version, there is a menu at the bottom, which is referenced by an iframe. Then use fixed to position the iframe or the fixed element contains the iframe. The element cannot be seen on the mobile phone. For example,

		<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>
on the mobile phone Nothing is displayed, but
		<div style="position: fixed;left: 0px;bottom: 0px;height:100px;width: 100%;background-color: red;">		</div>
displays a red box. Is this a compatibility issue? How to solve it?


Reply to the discussion (solution)

Please give me guidance!!!

The problem is related to the sentence

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

. Just delete it. Why is this?

After testing, only the Meizu phone does not display.

It has nothing to do with compatibility and the code is defective. . . .

Compatibility is irrelevant, the code is defective. . . .

Can you be more specific?

If you add html{margin:0;padding:0;border:0;} to the css, will a red box still appear? ? ?

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