Показать сообщение отдельно
  #5 (permalink)  
Старый 17.05.2011, 16:43
Аватар для Aetae
Тлен
Отправить личное сообщение для Aetae Посмотреть профиль Найти все сообщения от Aetae
 
Регистрация: 02.01.2010
Сообщений: 6,501

Тока не 10 одинаковых. А одну background'ом с разными background-position в 10 div'ов.
<!DOCTYPE HTML>
<html>
<head>
  <style type="text/css">
  div {background-image:url(http://javascript.ru/forum/images/ca_serenity/misc/logo.gif); width:336px; height:11px; position:relative}
  </style>
</head>
<body>   
<div style="background-position:0 0px"></div>
<div style="background-position:0 -11px"></div>
<div style="background-position:0 -22px"></div>
<div style="background-position:0 -33px"></div>
<div style="background-position:0 -44px"></div>
<div style="background-position:0 -55px"></div>
<div style="background-position:0 -66px"></div>

<script>
d=document.getElementsByTagName('div');
(function(){
d[Math.floor(Math.random()*d.length)].style.left=Math.floor(Math.random()*10)-5+'px';
setTimeout(arguments.callee,50)
})()
</script>
  
</body>
</html>
__________________
29375, 35
Ответить с цитированием