1
如何在url處於脫機狀態時停止微調,並顯示脫機或未找到url的警告?如果url iframe離線或未找到,則無法停止加載
CSS
#loadImg {
position: absolute;
z-index: 999;
}
#loadImg div {
display: table-cell;
background: #fff;
height: 633px;
text-align: center;
vertical-align: middle;
width: 2000px;
}
HTML
<div id="loadImg">
<div>
<img src="https://2.bp.blogspot.com/-9XwrYMe59OY/WOBFFeppEYI/AAAAAAAAB2A/CtyK_-GN8DUMzJypSJqnLKEDn4f-5_fOwCLcB/s320/balls.gif" />
</div>
</div>
<iframe width="100%" onload="document.getElementById('loadImg').style.display='none';" frameborder="0" height="1000px" class="col-sm-12" src="https://testmyweb.com/"></iframe>