本文實例講述了jQuery實現頁面頂部顯示的進度條效果。分享給大家供大家參考,具體如下:
具體代碼如下:
<!Doctype html><html><head><title>頁面頂部顯示的進度條效果</title><meta http-equiv=Content-Type content="text/html;charset=utf-8"></head><body><div id="web_loading"><div></div></div><script src="jquery1.8.3.min.js" type="text/javascript"></script><script type="text/javascript">// < ![CDATA[ jQuery(document).ready(function(){ jQuery("#web_loading div").animate({width:"100%"},800,function(){ setTimeout(function(){jQuery("#web_loading div").fadeOut(500); }); }); });// ]]></script><style>#web_loading{z-index:99999;width:100%;}#web_loading div{width:0;height:5px;background:#FF9F15;}</style</body></html>
完整實例代碼點擊此處本站下載。
希望本文所述對大家jQuery程序設計有所幫助。
新聞熱點
疑難解答