我希望我的预加载器能够顺利淡出,我使用波纹管代码,但它不能正常工作......
CSS
CODE.body{ width:100%; height:1000px; overflow:hidden; } #loader{ width:100px; height:100px; border:solid 5px blue; border-top:solid 5px #F69; border-bottom:solid 5px #F69; border-radius:100%; position:absolute; top:0; left:0; right:0; bottom:0; margin:auto; -webkit-animation: spin 2s linear infinite; animation: spin 2s linear infinite; } @keyframes spin{ from{ transform:rotate(0deg); width:100px; height:100px;} to{ transform:rotate(360deg); width:100px; height:100px;} }
<body onload="myFunction()" >
<div id="loader" style="z-index:999;">
</div>
</body>
脚本
function myFunction() { $("bloader").fadeOut(2000); myVar = setTimeout(showPage, 2000); }
在你的脚本中
$("bloader").fadeOut(2000);
应该
$("#loader").fadeOut(2000);