You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Актуальные контакты:
Telegram: @Nikker_web
E-Mail: tarasevich.email@gmail.com
Портфолио https://www.behance.net/d4d4186e
Разрабатываю дизайн групп в соц сетях, сайтов, приложений, другой дизайн под заказ
Актуальные контакты:
Telegram: @Nikker_web
E-Mail: tarasevich.email@gmail.com
Разрабатываю дизайн групп в соц сетях, сайтов, приложений, другой дизайн под заказ
Портфолио https://www.behance.net/d4d4186e
Question
mario
Не пойму почему проблемы с меню в ИЕ.
Проблема заключается в том что при отвода указателя, меню не пропадает а начанает трястись...
Вот код:
хтмл.
ксс.
#menu {width:100%;border-bottom: 1px solid #f2f2f2;height: 36px;padding-left: 15px;}
ul.menu {list-style:none; margin:0; padding:0; text-align: center;width:100%;}
ul.menu * {margin:0; padding:0}
ul.menu a {display:block; color:#000; text-decoration:none}
ul.menu li {position:relative; float:left;}
ul.menu ul {position:absolute; top:37px; left:0; background:#fff; display:none; opacity:0; list-style:none}
ul.menu ul li {position:relative; border:1px solid #f2f2f2; border-top:none; width:148px; margin:0}
ul.menu ul li a {display:block; padding:3px 7px 5px; background-color:#fff}
ul.menu ul li a:hover {background-color:#C8AC1D;color:#fff;}
ul.menu ul ul {left:148px; top:0px}
ul.menu .menulink {padding:5px 7px 16px 7px; font-weight:bold; background:url(../i/mgrad1.gif.gif) #fff; width:134px}
ul.menu .menulink:hover, ul.menu .menuhover {background:url(../i/mgrad.gif)}
ul.menu .sub {background:#fff url(../i/arrow.gif) 136px 8px no-repeat}
ul.menu .sub:hover {background-color:#C8AC1D;}
ul.menu .topline {border-top:1px solid #f2f2f2}
жаваскрипт.
var menu=function(){var t=15,z=50,s=6,a;
function dd(n){this.n=n; this.h=[]; this.c=[]}
dd.prototype.init=function(p,c){
a=c; var w=document.getElementById(p), s=w.getElementsByTagName('ul'), l=s.length, i=0;
for(i;i<l;i++){
var h=s[i].parentNode; this.h[i]=h; this.c[i]=s[i];
h.onmouseover=new Function(this.n+'.st('+i+',true)');
h.onmouseout=new Function(this.n+'.st('+i+')');
}
}
dd.prototype.st=function(x,f){
var c=this.c[x], h=this.h[x], p=h.getElementsByTagName('a')[0];
clearInterval(c.t); c.style.overflow='hidden';
if(f){
p.className+=' '+a;
if(!c.mh){c.style.display='block'; c.style.height=''; c.mh=c.offsetHeight; c.style.height=0}
if(c.mh==c.offsetHeight){c.style.overflow='visible'}
else{c.style.zIndex=z; z++; c.t=setInterval(function(){sl(c,1)},t)}
}else{p.className=p.className.replace(a,''); c.t=setInterval(function(){sl(c,-1)},t)}
}
function sl(c,f){
var h=c.offsetHeight;
if((h<=0&&f!=1)||(h>=c.mh&&f==1)){
if(f==1){c.style.filter=''; c.style.opacity=1; c.style.overflow='visible'}
clearInterval(c.t); return
}
var d=(f==1)?Math.ceil((c.mh-h)/s):Math.ceil(h/s), o=h/c.mh;
c.style.opacity=o; c.style.filter='alpha(opacity='+(o*100)+')';
c.style.height=h+(d*f)+'px'
}
return{dd:dd}
}();
Link to comment
Share on other sites
9 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.