Пятница, 04.07.2025, 12:28
Приветствую Вас Г0сть | RSS
[ Новые сообщения · Участники · Правила форума · Поиск · RSS ]
  • Страница 1 из 1
  • 1
Летающие меню
MithriilДата: Воскресенье, 19.08.2007, 16:04 | Сообщение # 1
Генералиссимус
Группа: Администратор Сайта
Сообщений: 184
Репутация: 4
Статус: Offline
BODY
[code]<SCRIPT LANGUAGE = "JavaScript">
function showObject(object) {
object.visibility = VISIBLE;
}
function hideObject(object) {
object.visibility = HIDDEN;
}
function slideLogo(from, to) {
if (from < to) {
company.top = (from += 10);
setTimeout('slideLogo(' + from + ',' + to + ')', 75);//fantasyflash.ru
}
else initObjects();
}

function rotateObjects() {
for (var i = 0; i < pos.length; i++) {
pos[i] += inc; objects[i].visibility = 'visible';//osw
objects[i].left = (r * Math.cos(pos[i])) + xoff
objects[i].top = (r * Math.sin(pos[i])) + yoff;
}
rotateTimer = setTimeout("rotateObjects()", 70);
}

function initObjects() {
objects = new Array(fly1, fly2, fly3, fly4);
pos = new Array();
pos[0] = 0;
for (var i = 1; i < objects.length; i++) {
pos[i] = parseFloat(pos[i - 1] + ((2 * pi) / objects.length));
}
rotateObjects();
}


 
MithriilДата: Воскресенье, 19.08.2007, 16:04 | Сообщение # 2
Генералиссимус
Группа: Администратор Сайта
Сообщений: 184
Репутация: 4
Статус: Offline
var objects;
var pos;
var r = 160; // радиус
var xoff = 400;
var yoff = 170;
var pi = Math.PI;
var inc = pi / 180;
var objects;
var pos;
</SCRIPT>
<DIV ID = "fly1" CLASS = "fly"> <A HREF = "http://fantasyflash.ru" onMouseOver = "showObject(desc1)" onMouseOut = "hideObject(desc1)">Линка1</A><BR></DIV> <DIV ID = "fly2" CLASS = "fly"> <A HREF = "http://fantasyflash.ru" onMouseOver = "showObject(desc2)" onMouseOut = "hideObject(desc2)">Линка2</A><BR> </DIV> <DIV ID = "fly3" CLASS = "fly"> <A HREF = "http://fantasyflash.ru" onMouseOver = "showObject(desc3)" onMouseOut = "hideObject(desc3)">Линка3</A><BR> </DIV> <DIV ID = "fly4" CLASS = "fly"> <A HREF = "http://fantasyflash.ru" onMouseOver = "showObject(desc4)" onMouseOut = "hideObject(desc4)">Линка4</A><BR> </DIV> <DIV ID = "company" CLASS = "logo">.:Меню:.</DIV> <DIV ID = "desc1" CLASS = "desc"> Описание первой ссылки </DIV> <DIV ID = "desc2" CLASS = "desc"> А это Описание второй ссылки</DIV> <DIV ID = "desc3" CLASS = "desc"> Описание третьей ссылки </DIV> <DIV ID = "desc4" CLASS = "desc"> А это Описание четвертой ссылки </DIV>
<SCRIPT LANGUAGE = "JavaScript">
var isNS = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) >= 4);
var HIDDEN = (isNS) ? 'hide' : 'hidden';
var VISIBLE = (isNS) ? 'show' : 'visible';
var fly1 = (isNS) ? document.fly1 : document.all.fly1.style;
var fly2 = (isNS) ? document.fly2 : document.all.fly2.style;
var fly3 = (isNS) ? document.fly3 : document.all.fly3.style;
var fly4 = (isNS) ? document.fly4 : document.all.fly4.style;
var company = (isNS) ? document.company : document.all.company.style;
var desc1 = (isNS) ? document.desc1 : document.all.desc1.style;
var desc2 = (isNS) ? document.desc2 : document.all.desc2.style;
var desc3 = (isNS) ? document.desc3 : document.all.desc3.style;
var desc4 = (isNS) ? document.desc4 : document.all.desc4.style;
slideLogo(0, 140);
</SCRIPT></CENTER>[/code]


 
MithriilДата: Воскресенье, 19.08.2007, 16:04 | Сообщение # 3
Генералиссимус
Группа: Администратор Сайта
Сообщений: 184
Репутация: 4
Статус: Offline
HEAD
Code
<STYLE>
.fly {
color:          aqua;
font-family:    arial;
font-size:      24px;
position:       absolute;
visibility:     hidden;
z-index:        2;
}
.logo {
font-family:    arial;
font-size:      30px;
color:          pink;
position:       absolute;
top:            0px;
left:           200px;
visibility:     visible;
z-index:        1;
}
.desc {
text-align:     center;
font-family:    arial;
font-size:      12px;
color:          red;
position:       absolute;
top:            220px;
left:           240px;
width:          400px;
visibility:     hidden;
z-index:        0;
}
A {
color: #9933CC;}
</STYLE>


 
  • Страница 1 из 1
  • 1
Поиск: