html


 

<div /></div>

 

css


#loading {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 2000;
opacity: 1;
}

#loading img {
width: 100%;
position: absolute;
z-index: 2001;
}

 

js


 

 

//监听加载状态改变
document.onreadystatechange = completeLoading;
//加载状态为complete时移除loading效果
function completeLoading() {
if (document.readyState == "complete") {
$("#loading").animate({
"opacity": "0"
}, 500).hide(1000);
}
}

相关文章:

  • 2022-02-18
  • 2022-12-23
  • 2021-07-24
  • 2021-08-14
  • 2021-12-12
  • 2022-12-23
  • 2021-08-12
  • 2021-07-27
猜你喜欢
  • 2021-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-19
  • 2022-02-07
  • 2021-11-19
  • 2022-02-07
相关资源
相似解决方案