简体   繁体   English

隐藏的Safari iframe可见性不起作用

[英]Safari iframe visibility hidden not working

I have an iframe and it's code is: 我有一个iframe,它的代码是:

<iframe page_id="3" allowtransparency="true" src="https://www.mysite.com/" name="custom-frame" id="custom-frame-2044963" class="custom-frame" style="visibility: hidden; height: 1014px; width: 1060px;" scrolling="no" frameborder="0" width="100%" height="0" content_height="217"></iframe>

For some reason visibility: hidden is not working in Safari yet it is in Chrome and FF. 出于某种原因, visibility: hidden功能在Safari中不起作用,但在Chrome和FF中却有效。 I've never come across this before. 我以前从未遇到过。 It seems to be a new issue since this code is very very old. 由于此代码非常旧,因此似乎是一个新问题。 Any ideas? 有任何想法吗?

I am not toggling display to avoid some other issues. 我不会为了避免其他问题而切换display

EDIT It looks like a Safari bug? 编辑它看起来像一个Safari bug? http://jsfiddle.net/y2V3T/ v7.0.4 http://jsfiddle.net/y2V3T/ v7.0.4

If visibility: hidden is not working you can also use opacity: 0; 如果可见性:隐藏不起作用,您还可以使用不透明度:0;

The code would look like this: 代码如下所示:

<iframe page_id="3" allowtransparency="true" src="https://www.example.com/" name="custom-frame" id="custom-frame-2044963" class="custom-frame" style="opacity: 0; height: 1014px; width: 1060px;" scrolling="no" frameborder="0" width="100%" height="0" content_height="217"></iframe>

Let's see if this is a legit bug, as I think it is: 让我们看看这是否是合法错误,因为我认为是:

https://bugs.webkit.org/show_bug.cgi?id=134774 https://bugs.webkit.org/show_bug.cgi?id=134774

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

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