$("#pageloading").height($(window).height());
<style type="text/css">
#pageloading{position:absolute; left:0px; top:0px; opacity:0.6; background:#fff url('lib/images/loading.gif') no-repeat center; width:100%; height:100%; height:600px; z-index:99999;}
</style>
<div id="pageloading"></div>
页面加载完毕后 加入
<script type="text/javascript">
$("#pageloading").fadeOut()
</script>
<style type="text/css">
#pageloading{position:absolute; left:0px; top:0px; opacity:0.6; background:#fff url('lib/images/loading.gif') no-repeat center; width:100%; height:100%; height:600px; z-index:99999;}
</style>
<div id="pageloading"></div>
页面加载完毕后 加入
<script type="text/javascript">
$("#pageloading").fadeOut()
</script>
本文介绍了一种使用HTML、CSS及JavaScript实现的页面加载效果。通过设置绝对定位与透明度等样式,结合淡入淡出的JavaScript操作,为用户提供良好的加载体验。
2620

被折叠的 条评论
为什么被折叠?



