Setting iFrame CSS to display:none during load

前端 未结 5 1119
傲寒
傲寒 2021-01-11 12:46

I have this:

5条回答
  •  情歌与酒
    2021-01-11 13:26

    Firefox currently does have an issue with display:none:

    Some browsers assume that when "display:none" is applied to replaced elements (like Flash or an iframe) the visual info for that element is no longer needed. So, if the element is later displayed by the CSS, the browser will actually recreate the visual data form scratch.

    I imagine that having the iframe default to "display:none;" makes the browser skip the rendering of the HTML so the tags don't have any dimensions. I would set the visibility to "hidden" or position it off the page rather than use "display:none;".

    Steven Paligo

    Link

提交回复
热议问题