Ну по диагонали тоже не так сложно:
<style type="text/css">
div {
background: blue;
position: absolute;
color: white;
text-align: center;
width: 50px;
height: 50px;
}
</style>
<script type="text/javascript">
window.onload = function(){
var i = 0;
(function(){
if(++i <= 100){
var element = document.getElementsByTagName('div')[0];
element.style.cssText = 'top:'+i+'px; left:'+i+'px';
setTimeout(arguments.callee, 10);
}
})();
};
</script>
<div></div>
|
Цитата:
|
Цитата:
Цитата:
И расставляешь ты не селекторы... А некие элементы в ХТМЛ. :) Сейчас примерчик чёле сделаю, раз ты ленишся это делать... |
Пример...
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<style>
* {
margin: 0;
padding: 0;
}
html,
body {
width: 100%;
height: 100%;
}
.box {
position: absolute;
width: 100px;
height: 100px;
}
#item1 {
top: 10px;
left: 10px;
background-color: blue;
}
#item2 {
top: 100px;
left: 200px;
background-color: red;
}
#item3 {
top: 50px;
left: 350px;
background-color: orange;
}
</style>
</head>
<body>
<div class='box' id='item1'></div>
<div class='box' id='item2'></div>
<div class='box' id='item3'></div>
</body>
</html>
- Поставь ДИВам нужные размеры - Картинку свою бекграундом - Поставь в нужные места и таки двигай их себе на здоровье
document.getElementById('item1').style.top=<нужное_значение>
document.getElementById('item1').style.left=<нужное_значение>
|
ksa, большое спасибо! И за ссылку, и особенно за пример. Напишу в комментариях твой ник :)
|
Цитата:
Цитата:
|
| Часовой пояс GMT +3, время: 23:00. |