页面代码
<html>
<head>
<script type="text/javascript">
function demo(){
$("body").css({
"margin":"0px"
});
$("#loading").css({
"position":"absolute",
"display":"block",
"background-color":"gray",
"z-index":"1000",
"opacity":"0.5"
});
$("#txt").css({
"position":"absolute",
"display":"block",
"left":"50%",
"top":"50%",
"z-index":"10000"
});
}
</script>
</head>
<body>
<div id="loading" style="width:100%;height:100%;display:none"></div>
<div id="txt" style="display:none">
请稍等 <img alt="" src="img/loading.gif" style="height:16px">
</div>
</body>
</html>
本文介绍了一个简单的页面加载效果实现方案,使用HTML、CSS和JavaScript来创建一个遮罩层和加载提示,通过设置元素的位置和样式属性,实现了居中显示的加载动画。
&spm=1001.2101.3001.5002&articleId=52043109&d=1&t=3&u=09f4d7340eb547618f18256df466e5cb)
665

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



