简体   繁体   English

使用iframe-resizer插件的高度为0的iframe

[英]iframe with height 0 using iframe-resizer plugin

I've a page with some iframe, I've used the iframe-resizer plugin to autoresize the iframes, but it has a very strange behavior: At the beginning just one iframe is visible, the others are all display: none. 我有一个带有iframe的页面,我使用iframe-resizer插件自动调整iframe,但它有一个非常奇怪的行为:开始时只有一个iframe可见,其他都显示:none。 Sometimes when i switch from one iframe to another, the new iframe appaer to have height 0 on firefox and height 4398px(too high) on chrome, the common behavior is that, resizing the browser, the iframe get the right height. 有时当我从一个iframe切换到另一个iframe时,新的iframe appaer在firefox上的高度为0,在chrome上的高度为4398px(太高),常见的行为是,调整浏览器大小,iframe获得正确的高度。

What can I do? 我能做什么?

This is a bug in FireFox. 这是FireFox中的一个错误。 You can work around it by using visibility: hidden , instead of display: none . 您可以使用visibility: hidden而不是display: none来解决它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM