A空城
<body onload="timedMsg()">
<div ID="div"></div>
<script>
function timedMsg(){
var d = new Date();
var t = d.getDate();
var m = d.getMonth()+1;
var y = d.getYear()+1900;
var h = d.getHours();
var f = d.getMinutes();
var s = d.getSeconds();
m = m < 10 ? ('0' + m) : m;
t = t < 10 ? ('0' + t) : t;
h = h < 10 ? ('0' + h) : h;
f = f < 10 ? ('0' + f) : f;
s = s < 10 ? ('0' + s) : s;
var jieguo = y+'-'+m+'-'+t+' '+h+':'+f+':'+s;
document.getElementById('div').innerHTML = jieguo;
setTimeout("timedMsg()", 1000);
}
</script>
</body>这个不是CSS可以写出来的,要用JS,以上是代码