![]() |
#2
aspic2009-11-12 09:35
![]() <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www. xmlns="http://www. http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>无标题文档</title> <style type="text/css"> time{font-family:comic sans ms; font-size:14pt; font-weight:bold; color:#00008D; } </style> <script> var ctimer; function settimes() { document.getElementById('tim2').style.left = document.getElementById('tim1').style.posLeft + 10; document.getElementById('tim2').style.top = document.getElementById('tim1').style.posTop + document.getElementById('tim1').offsetHeight + 81; var time = new Date(); h = time.getHours(); m = time.getMinutes(); s = time.getSeconds(); if (h < 10) { h = "0" + h; } if (m < 10) { m = "0" + m; } if (s < 10) { s = "0" + s; } document.getElementById('tim1').innerHTML = h + ":" + m + ":" + s; document.getElementById('tim2').innerHTML = h + ":" + m + ":" + s; ctimer = setTimeout('settimes()', 1000); } </script> </head> <body onload="settimes()"> <h1>水中倒影</h1> <hr/> <div id="tim1" style="position:relative;width:10px;height:10px;top:100px;left:100px" class="time"></div> <div id="tim2" style="position:absolute;Filter:Flipv()alpha(opacity=50);font-style:italic" class="time"></div> </body> </html> |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
time{font-family:comic sans ms;
font-size:14pt;
font-weight:bold;
color:#00008D;
}
</style>
<script language="javascript" type="text/javascript">
var ctimer;
function settimes(){
tim2.style.left=tim1.style.posLeft;
tim2.style.top=tim1.style.posTop+tim1.offsetHeight-6;
var time=new Date();
h=time.getHours();
m=time.getMinutes();
s=time.getSeconds();
if(h<10){h="0"+h;}
if(m<10){m="0"+m;}
if(s<10){s="0"+s;}
tim1.innerHTML=h+":"+m+":"+s;
tim2.innerHTML=h+":"+m+":"+s;
ctimer=setTimeout('settimes()',1000);
}
</script>
</head>
<body onload="settimes()">
<center>
<h1>水中倒影</h1>
<hr/>
<div id="tim1" style="position:relative;width:10;height:10;top:100;left:100" class="time"></div>
<div id="tim2" style="position:absolute;Filter:Flipv()alpha(opacity=20);font-style:italic" class="time"></div>
</center>
</body>
</html>