 |
|
 |
| |
| Красивое боковое меню для сайта |
| MarkoniYA
| Дата: Среда, 26.05.10, 21:04:23 | Сообщение # 1
|
|
Ставим себе этот код в нижнюю часть сайта: Доступно только для пользователейCode <div class="layer"><ul class="layer_ul"> <li><img src="http://markoniya.ucoz.ru/image/menu/ico_news.png" onMouseOver=src="http://markoniya.ucoz.ru/image/menu/ico_news2.png" onMouseOut=src="http://markoniya.ucoz.ru/image/menu/ico_news.png" border="0" alt="" /> <div class="layer_block"> <div class="pad10"> <h3>Популярные новости</h3> <ul class="layer_block_ul"> $MYINF_8$ </ul> </div> </div> </li> <li><img src="http://markoniya.ucoz.ru/image/menu/ico_information.png" onMouseOver=src="http://markoniya.ucoz.ru/image/menu/ico_information2.png" onMouseOut=src="http://markoniya.ucoz.ru/image/menu/ico_information.png" border="0" alt="" /> <div class="layer_block"> <div class="pad10"> <h3>Информация</h3> <br><br> Сайт не распространяет и не хранит электронные версии произведений, на сайте размещены ссылки на открытые ресурсы сети Интернет, присылаемые и публикуемые пользователями. <br><br> У нас Вы найдёте ссылки на полезные программы, красивые обои, музыку различных направлений, книги и справочники, юмор и новости со всего света. <br><br>Все бесплатно и без мусора.<br>Сайт не содержит порнографии и назойливой рекламы.<br>Регистрация - по Вашему желанию.<br><br>Заходите, мы Вам рады! </div> </div> </li> <li><img src="http://markoniya.ucoz.ru/image/menu/ico_menu.png" onMouseOver=src="http://markoniya.ucoz.ru/image/menu/ico_menu2.png" onMouseOut=src="http://markoniya.ucoz.ru/image/menu/ico_menu.png" border="0" alt="" /> <div class="layer_block"> <div class="pad10">
<h3>Полезности</h3> <br><br> <ul class="project"> <li><a href="http://markoniya.ucoz.ru/index/0-2" target="_blank">Правила сайта</a></li> <li><a href="http://markoniya.ucoz.ru//news/0-0-0-0-1" target="_blank">Добавить новость</a></li> </ul> </div> </div> </li> <li><img src="http://markoniya.ucoz.ru/image/menu/ico_star.png" onMouseOver=src="http://markoniya.ucoz.ru/image/menu/ico_star2.png" onMouseOut=src="http://markoniya.ucoz.ru/image/menu/ico_star.png" border="0" alt="" /> <div class="layer_block"> <div class="pad10">
<h3>Меню сайта</h3> <br><br> <ul class="project"> <li><a href="http://markoniya.ucoz.ru/">Главная</a></li> <li><a href="http://markoniya.ucoz.ru/forum" target="_blank">Форум</a></li> <li><a href="http://markoniya.ucoz.ru/blog" target="_blank">V.I.P</a></li> <li><a href="http://markoniya.ucoz.ru/gb" target="_blank">Гостевая</a></li> <li><a href="http://markoniya.ucoz.ru/faq" target="_blank">Помощь</a></li> </ul> </div> </div> </li> </ul> </div> </td> </tr></tbody></table> <script src="http://markoniya.ucoz.ru/image/menu/hint.js" type="text/javascript"></script> <link type="text/css" rel="StyleSheet" href="http://markoniya.ucoz.ru/image/menu/my.css"> Ссылки и меню настраиваем под себя. Картинки также можно заменить на свои. Кто хочет заливает все на свой сайт.
Работа - убежище людей, которые ничего лучшего делать не умеют. (О. Уайлд)
| |
|
|
| |
| WOLF
| Дата: Четверг, 27.05.10, 18:03:08 | Сообщение # 2
|
|
/image/menu/hint.js Доступно только для пользователейCode // 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']; var textmarker = ['title','alt']; 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); } /image/menu/my.css Доступно только для пользователейCode /* MenuCenterL */ .layer{position:fixed; left:0px; top:260px; width:43px; height:170px; background:url(http://markoniya.ucoz.ru/image/menu/layer.png) no-repeat top right} .layer_ul{padding:18px 0px 10px 7px; margin:0px; list-style:none; position:relative;} .layer_ul li{display:block; height:31px; padding:0px; margin:0px;} .layer_ul li:hover{background:url(http://markoniya.ucoz.ru/image/menu/layer_li_hover_56.png) no-repeat; cursor:pointer;}
.layer_block{position:absolute; left:42px; padding:4px; top:0px; width:243px; height:358px; background:url(http://markoniya.ucoz.ru/image/menu/layer_blok.png) no-repeat 0px top; display:none; color:#FFF} .layer_block h3{border-bottom:1px solid #fff; color:#FFF; margin:10px 14px 5px 5px} .layer_ul li:hover .layer_block{display:block; cursor:default;}
.layer_block_ul{padding:0px; margin:0px; list-style:none;} .layer_block_ul li{display:block; padding:50px; margin:10px 5px 5px 0px; border:1px solid #bcd959; height:auto; color:#333} .layer_block_ul li a{display:block; color:#FFF; font-weight:bold;} .layer_block_ul li span{display:block;} #leyer_block_text{max-height:26px; overflow:hidden;} .layer_block_ul li:hover{background:url(http://markoniya.ucoz.ru/image/menu/forum_a_hover.png);} .layer_block_ul li img{display:none;} .blok_li_a_news{display:block; height:15px; overflow:hidden}
.project{padding:0px; margin:0px 8px 0px 0px; max-height:315px; overflow:hidden; list-style:none;} .project li{display:block; padding:0px; margin:0px; border-bottom:1px dotted #FFF; background:url(http://markoniya.ucoz.ru/image/menu/star.png) no-repeat left center; height:20px} .project li a{padding:3px 0px 0px 18px; display:block; height:18px; color:#FFF; height:17px; font-weight:bold; overflow:hidden; line-height:15px} .project li:hover{background:url(http://markoniya.ucoz.ru/image/menu/star.png) no-repeat left center;} .project li a:hover{background:url(http://markoniya.ucoz.ru/image/menu/forum_a_hover.png); color:#333;} /* --------- */
/* ----////// Эффект прозрачности /////------- */ #banners a img { opacity:0.3; -moz-opacity:0.3; filter:alpha(opacity=40); }
#banners a:hover img { opacity:1.0; -moz-opacity:1.0; filter:alpha(opacity=100); } /* ----////// *** /////------- */
| |
|
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
| Правила для всех: |
| Читаем внимательно! |
|
|
|
|
 |
|
 |
| | |