How to hidden iframe before its content loading finished?

When you use an iframe to display any content on your website, they maybe loading slower than your page content loading speed.
Your iframe will be an empty element until its content loading finished.

To fix, we have to hidden that iframe until it finished loading. Add your iframe some below properties:

<iframe style="visibility:hidden;" onload="this.style.visibility = 'visible';" src="../examples.html" > 
</iframe>

Copy this code


In this example, your iframe will be hidden when loading and visible when finished loading content.

© 2019 4codev

Created with love by Sil.