87,904
社区成员
发帖
与我相关
我的任务
分享
<!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=gb2312" />
<title>Dialog</title>
<style type="text/css">
</style>
</head>
<body>
<div id='sss' style=" height:400px;; width:400px; border:1px solid #000000; position:absolute;" onclick="alert('a')">
<div style="height:24px; width:100%; background-color:#006600; position:absolute">11</div>
<div id='ss' style=" height: 100%; width:auto; background-color:#FFFF66"></div>
</div>
<script>
function $(id){return document.getElementById(id)}
//var i =10
//setInterval(function(){$('sss').style.left =i;i=i+10;},100)
var h =400;
timer = setInterval(function(){$('sss').style.height =h+'px';h=h-10;},100)
</script>
</body>
</html>
<!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=gb2312" />
<title>Dialog</title>
<style type="text/css">
</style>
</head>
<body>
<div id='sss' style=" height:400px;; width:400px; border:1px solid #000000; position:absolute;" onclick="alert('a')">
<div style="height:24px; width:100%; background-color:#006600; position:absolute">11</div>
<div id='ss' style=" height: 100%; width:100%; background-color:#FFFF66"></div>
</div>
<script>
function $(id){return document.getElementById(id)}
var h =400;
timer = setInterval(function(){$('sss').style.height = $('ss').style.height = (h-=10) +'px';},100)
</script>
</body>
</html>