zjffun blog

Why Does a Iframe Cause Two Scroll Bars

更新于 写于 iframeCSS

Sometimes, we may set the height of iframe to it container height, but we'll see there are two scroll bars on in the iframe and one in the container. That because the iframe is an inline element. We can fix this by set the iframe to be a block element.

Example: