Help me find a solution for the responsive iframe window. For example: if the size content of the window iframe changes, iframe resize automatically in parent window.
Note: in iframe window dynamically content.
Help me find a solution for the responsive iframe window. For example: if the size content of the window iframe changes, iframe resize automatically in parent window.
Note: in iframe window dynamically content.
I found a solution from Avi:
// HTML
<div class="myIframe">
<iframe> </iframe>
</div>
// CSS
.myIframe {
position: relative;
padding-bottom: 65.25%;
padding-top: 30px;
height: 0;
overflow: auto;
-webkit-overflow-scrolling:touch; //<<--- THIS IS THE KEY
border: solid black 1px;
}
.myIframe iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}