iframe size with CSS on iOS

前端 未结 4 1488
旧巷少年郎
旧巷少年郎 2020-11-27 20:29

There\'s an iframe, which basically has more content than fits into the frame. The sizing of the frame is based on the browser screen size and lets the overflow scroll, whic

4条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-27 21:21

    using height: 1px; min-height: 100%; did not work for me, though I did not need a scrolling element. I had to use the overflow:auto; on a surrounding div instead. Note that this method is discouraged as it may have unintended consequences, but I tested on Android/iOS and desktop browsers and could not find any issues yet. fingers crossed.

    This is a nice post from Andy Shora on some iOS iframe nuances: http://andyshora.com/iframes-responsive-web-apps-tips.html

提交回复
热议问题