CSS vh units inside an iframe

前端 未结 2 1084
北恋
北恋 2020-12-29 03:48

I\'m trying to use CSS vh units inside of an iframe. I\'m finding that they are scaled to the size of the iframe somehow. In other words, 100vh isn\'t the windo

2条回答
  •  生来不讨喜
    2020-12-29 04:11

    I know this is an old question, but as people move toward the vh unit, this question will become much more common.

    To clarify, here's an example of the problem. We have an HTML file that loads an iframe: