Today, the IFRAME adaptive height is used in the project.
It is depressing that the IFRAME adaptive height cannot be achieved through a variety of adaptive height methods on the Internet.
After testing, the height of the obtained iframe src page (body/documentelement) is always 0.
After investigation by multiple parties, the cause is found, and the cause is quite depressing:
The general framework of the iframe src page submitted by the artist is as follows:
<Body>
<Div id = "Main"> ...... </div>
</Body>
Unfortunately, the artist added "--" to the main style.Float: left
After being float, div id = "Main" has been detached from the document stream, but it happens that there is only one such thing in the body.
Therefore, the height of the retrieved body is always 0 !!!!
--- I don't understand. There is only one main in the body. Why should the artist float it ???