您好,欢迎光临! 推荐您使用Chrome浏览器访问本站。

jQuery实现彩带效果的网页加载条动画

jQuery实现彩带效果的网页加载条动画


 

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>页面初加载的动画</title>
<style type="text/css">
body{margin:0;}
.top_bg{height:5px;width:0;background-color:#093; background-image:url(/jscss/demoimg/201209/colorbg.png);}/*如果你喜欢博主的那个彩带背景欢迎下载,直接把background:#f03换成背景*/
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
 $(document).ready(function(){
 //顶部背景动画
 $(".top_bg").animate({
 width: "100%"
 },
 {
 queue: false,
 duration:4000
 });
 })
</script>
</head>
<body>
 <div class="top_bg"></div>
</body>
</html>

您可能也喜欢