ddlevelsmenu 는 IE6 에서 select 와 충돌 하 는 해결 방법 [정리]

1999 단어 html.netGoogle
원래 토론 게시 물: http://topic.csdn.net/u/20090511/11/d176e9da-7b96-4197-abc1-cf02ccbe1982.html ddlevelsmenu 는 사용 하기 좋 은 것 같 지만, 극악무도 한 IE6 아래 에 서 는 많은 문제 가 발생 할 수 있 습 니 다. 그 중 하 나 는 < select > 태그 와 충돌 하여 하위 메뉴 가 팝 업 되 지 않 습 니 다. google 에서 해결 방법 을 발견 하 는 것 입 니 다.
ddlevelsmenu. js 에 ddlevelsmenu. positionshim (this, submenu, dir, scrollX, scrollY) 이 있 습 니 다. 두 줄 의 코드 를 주석 하면 됩 니 다.
positionshim:function(header, submenu, dir, scrollX, scrollY){
    //alert(dir)
    if (header._istoplevel){
        var scrollY=window.pageYOffset? window.pageYOffset : this.standardbody.scrollTop
        var topgap=header._offsets.top-scrollY
        var bottomgap=scrollY+this.docheight-header._offsets.top-header._dimensions.h
        if (topgap>0){
            this.shimmy.topshim.style.left=scrollX+"px"
            this.shimmy.topshim.style.top=scrollY+"px"
            this.shimmy.topshim.style.width="99%"
            //this.shimmy.topshim.style.height=topgap+"px" //distance from top window edge to top of menu item
        }
        if (bottomgap>0){
            this.shimmy.bottomshim.style.left=scrollX+"px"
            this.shimmy.bottomshim.style.top=header._offsets.top + header._dimensions.h +"px"
            this.shimmy.bottomshim.style.width="99%"
            //this.shimmy.bottomshim.style.height=bottomgap+"px" //distance from bottom of menu item to bottom window edge
        }
    }
}

  하위 메뉴 에서 팝 업 할 수 없 는 문 제 는 해결 되 지만 IE6 에서 DIV 에서 SELECT 를 덮 을 수 없 는 bug 가 나타 날 수 있 습 니 다. 다행히 이 bug 는 받 아들 일 수 있 는 범위 안에 있 습 니 다.
ddlevelsmenu 메뉴 에 오 른 해적선 은 인정 할 수 밖 에 없 었 다.
 
  주: 본문 은 stu - acer 공간 에서 전 환 됩 니 다.

좋은 웹페이지 즐겨찾기