Вторник, 17.06.2025, 01:57
01:57
Обновить
Новые сообщения | Участники | Правила форума | Поиск | RSS |
Реклама:
Реклама Реклама

  • Страница 1 из 1
  • 1
Модератор форума: MAJIbIW, Opium  
Красивый хинт для темных дизайнов
MAJIbIW™Дата: Вторник, 06.07.2010, 09:00 | Сообщение # 1


Сынок, тут все решаю я ;)
Сообщений: 239
Награды: 4
Репутация: 24
Offline

[adminred]Вставляем в CSS[/adminred]

Code
<style>   
/* hint menu */   
.hint   
{   
background:url('http://i057.radikal.ru/1007/ba/0be3ee1b0c7f.gif   
');   
line-height:10px;   
color:#8e8e8e ;   
font-family:verdana,arial,helvetica;   
font-size:8pt;   
width:auto;   
border-top:1px solid #8e8e8e ;   
border-right:1px solid #8e8e8e ;   
border-bottom:1px solid #8e8e8e ;   
border-left:1px solid #8e8e8e ;   
margin:1px;   
padding:8px;   
position:absolute;   
visibility:hidden;   
}   
/* ---------------- */   
</style>   
<script>   
//Hint Start   
// CLASS : MW_System_Load   
// Init   
function MW_System_Load(){   
this.wib = screen.width;   
this.heb = screen.height;   
this.documes = (document.getElementById || document.createElement || document.getElementsByTagName) ? true : false;   
this.objects = window.addEventListener || window.attachEvent ? window : document.addEventListener ? document : null;   
this.types = 'load';   
}   
MW_System_Load.prototype.addsevent = function(func){   
if(this.objects.addEventListener){   
this.objects.addEventListener(this.types,func,false);   
return true;   
} else if (this.objects.attachEvent){   
this.objects.attachEvent("on" + this.types,func);   
} else {   
return false;   
}   
}   
MW_System_Load.prototype.browser = function(){   
this.ver = navigator.appVersion;   
this.agent = navigator.userAgent.toLowerCase();   
this.dom = document.getElementById ? 1:0;   
this.all = document.all ? 1:0;   
this.ie5 = (this.ver.indexOf("MSIE 5")>-1 && this.dom) ? 1:0;   
this.ie6 = (this.ver.indexOf("MSIE 6")>-1 && this.dom) ? 1:0;   
this.ie4 = (document.all && !this.dom) ? 1:0;   
this.ie = this.ie4 || this.ie5 || this.ie6;   
this.opera = this.agent.indexOf("opera")>-1;   
this.gecko = (this.agent.indexOf("gecko")!=-1) ? 1:0;   
this.bw = (this.ie || this.opera || this.gecko);   
return this;   
}   
MW_System_Load.prototype.findobj = function(obj){   
this.parent = window.document;   
if(this.parent[obj]){ return this.parent[obj]; }   
if(this.parent.all && this.parent.all[obj]){ return this.parent.all[obj]; }   
if(this.parent.layers && this.parent.layers[obj]){ return this.parent.layers[obj]; }   
if(this.parent.getElementById && this.parent.getElementById(obj)){ return this.parent.getElementById(obj); }   
return null;   
}   
var MW = new MW_System_Load();   
function MW_System_Hint(){}   
MW_System_Hint.prototype.show = function(obj,str){   
var hint = MW.findobj('hint');   
if(!obj){ return; }   
if(!MW.documes){ return; }   
if(!hint){ return; }   
hint.className = 'hint';   
hint.style.left = 15;   
hint.style.top = 50;   

obj.onmouseout = function(advance){   
hint.style.width = '';   
hint.style.visibility = 'hidden';   
if(hint.firstChild) hint.removeChild(hint.firstChild);   
hint.appendChild(document.createTextNode(str));   
};   
obj.onmousemove = function(advance){   
//str = str.replace(/</g,"<");   
//str = str.replace(/>/g,">");   
hint.style.width = '';   
hint.innerHTML = str;   
vc = document.getElementsByTagName((document.compatMode && document.compatMode=="CSS1Compat") ? "HTML":"BODY")[0];   
x = window.event ? event.clientX + vc.scrollLeft : advance.pageX;   
y = window.event ? event.clientY + vc.scrollTop : advance.pageY;   
vcwidth = vc.clientWidth ? vc.clientWidth + vc.scrollLeft : window.innerWidth + window.pageXOffset;   
vcheight = vc.innerHeight ? window.innerHeight + window.pageYOffset : vc.clientHeight + vc.scrollTop;   
if(hint.offsetWidth>500){ hint.style.width = '200'; }   
if((x + hint.offsetWidth + 15) > vcwidth){   
hint.style.left = x - hint.offsetWidth - 4;   
} else {   
hint.style.left = x + 15;   
}   
if((y + hint.offsetHeight + 19) > vcheight){   
hint.style.top = y - hint.offsetHeight;   
} else {   
hint.style.top = y + 25;   
}   
//if(typeof(hint.style.MozOpacity)!="undefined"){   
hint.style.opacity = '.91';   
hint.style.filter = "alpha(opacity:91)";   
//}   
hint.style.visibility = 'visible';   
};   
}   
MW_System_Hint.prototype.initialize = function(){   
var hint = document.createElement("DIV");   
hint.setAttribute('id','hint');   
document.getElementsByTagName('body')[0].appendChild(hint);   
hint.style.visibility = 'hidden';   
var hintmarker = ['a','img','img','input','span','div','textarea'];   
var textmarker = ['title','alt','title','title','title','title','title'];   
var lenmarker = hintmarker.length;   
for(var i=0; i<lenmarker; i++) {   
atr = document.getElementsByTagName(hintmarker[i]);   
for(var j=0; j<atr.length; j++)   
if(viewhint=atr[j].getAttribute(textmarker[i])){   
atr[j].removeAttribute(textmarker[i]);   
HINT.show(atr[j],viewhint);   
}   
}   
}   
var HINT = new MW_System_Hint();   
if(MW.objects){ MW.addsevent(HINT.initialize); }   
//Hint End   
</script>



[admingreen]Помогаю исправлять баги, недоработки, и всяческие неполадки в HTML и CSS сайта, а также изготавливаю и переделываю :Шаблоны, скрипты, HTML страницы для сайта[/admingreen]
  • Страница 1 из 1
  • 1
Поиск:

Статистика Форума
Лучшие пользователи
Уважаемые пользователи
Популярные темы
Недавно обновленные темы
MAJIbIW™ Постов [ 239 ]
toyot1k Постов [ 30 ]
KOMAR™ Постов [ 23 ]
pro100_HeKTo_(UA) Постов [ 23 ]
eShLywOw Постов [ 21 ]
Sk1L3Zz Постов [ 7 ]
makaroff Постов [ 6 ]
Batareyka Постов [ 4 ]
Aninew Постов [ 4 ]
bro Постов [ 4 ]
KOMAR™ Репутация [ 10002 ]
MAJIbIW™ Репутация [ 24 ]
makaroff Репутация [ 11 ]
Opium Репутация [ 6 ]
APEXI Репутация [ 4 ]
pro100_HeKTo_(UA) Репутация [ 2 ]
MenToJL Репутация [ 0 ]
MuHuPaJIkA Репутация [ 0 ]
stasja Репутация [ 0 ]
ST_oOR_M Репутация [ 0 ]
team [ 6 ]
v team???? [ 4 ]
plz [ 4 ]
Сделай Aву plz для Sk1L3ZZa [ 4 ]
by Legendbot [ 4 ]
makaroff [ 2 ]
plz [ 1 ]
ho4y v team) [ 1 ]
)) [ 1 ]
Шапка для HellDivisioN [ 1 ]
Привет [ 0 ]
Новый мини-профиль серый [ 0 ]
Радио онлайн для сайта [ 0 ]
Вид опроса - скрипт для ucoz [ 0 ]
Красивый поиск по сайту [ 0 ]
Очень красивый мини профиль [ 0 ]
Прикольные флэш часы для сайта [ 0 ]
флэш календарь [ 0 ]
Хороший изменённый мини-чат [ 0 ]
Поднятье страницы вверх [ 0 ]


gtl.ucoz.com © Все права защищены! 2009-2010 | Сайт оптимизирован под разрешение экрана 1280х1024 и браузеры Mozila Firefox
Дизайн данного сайта полностью принадлежит администратору сайта.