<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<style type="text/css">
div{
width: 50px;
height: 50px;
background-color: red;
position: absolute;
top: 0;
left: 0;
line-height: 50px;
text-align: center;
}
</style>
<script type="text/javascript">
window.οnlοad=function (){
for(var i=0;i<11;i++){
document.body.innerHTML+='<div>'+i+'</div>';
}
var aDiv=document.getElementsByTagName("div");
for(var j=0;j<6;j++){
aDiv[j].style.left=j*50+'px';
aDiv[j].style.top=j*50+'px';
}
for(var z=6;z<11;z++){
aDiv[z].style.left=z*50+'px';
aDiv[z].style.top=(10-z)*50+'px';
}
}
</script>
</head>
<body>
</body>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<style type="text/css">
div{
width: 50px;
height: 50px;
background-color: red;
position: absolute;
top: 0;
left: 0;
line-height: 50px;
text-align: center;
}
</style>
<script type="text/javascript">
window.οnlοad=function (){
for(var i=0;i<11;i++){
document.body.innerHTML+='<div>'+i+'</div>';
}
var aDiv=document.getElementsByTagName("div");
for(var j=0;j<6;j++){
aDiv[j].style.left=j*50+'px';
aDiv[j].style.top=j*50+'px';
}
for(var z=6;z<11;z++){
aDiv[z].style.left=z*50+'px';
aDiv[z].style.top=(10-z)*50+'px';
}
}
</script>
</head>
<body>
</body>
</html>