61,115
社区成员
发帖
与我相关
我的任务
分享
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
<script>
function dark (){
$(".light").css({ width:"10px",height:"10px",left:"20px",top:"20px",opacity:1});
$(".light").animate({ width:"50px",height:"50px",left:"0px",top:"0px",opacity:0},800,"linear",a());
};
function a () {
setTimeout("dark()",1000);
};
dark();
</script>
</head>
<body>
<div style="width:50px; height:50px; position:absolute">
<div class="light" style="border-radius:25px; background:#F00; position:absolute; "></div>
<div style="width:10px; height:10px; border-radius:10px; background:#F00; position:absolute; top:20px; left:20px;"></div>
</div>
</body>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
<script>
function dark (){
$(".light").css({ width:"10px",height:"10px",left:"20px",top:"20px",opacity:1});
$(".light").animate({ width:"50px",height:"50px",left:"0px",top:"0px",opacity:0},800,"linear",a());
};
function a () {
setTimeout("dark()",1000);
};
dark();
</script>
</head>
<body>
<div style="width:50px; height:50px; position:absolute">
<div class="light" style="border-radius:25px; background:#F00; position:absolute; "></div>
<div style="width:10px; height:10px; border-radius:10px; background:#F00; position:absolute; top:20px; left:20px;"></div>
</div>
</body>