search
HomeWeb Front-endHTML Tutorial下拉列表在ie6下不显示_html/css_WEB-ITnose


.dropdown UL {
PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; FLOAT: left; PADDING-TOP: 0px;width:149px;
}
.dropdown IMG {
BORDER-RIGHT-WIDTH: 0px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px
}
.dropdown LI {
LIST-STYLE-TYPE: none; FLOAT: left;width:149px;
}


UL.dropdown {
 WIDTH: 149px;
}
UL.dropdown LI {
LINE-HEIGHT: 44px !important; ZOOM: 1; FLOAT: left;  FONT-SIZE: 14px;WIDTH: 149px;
}
UL.dropdown A:link {
COLOR: #fff
}
UL.dropdown A:visited {
COLOR: #fff; TEXT-DECORATION: none
}
UL.dropdown A.hover {
COLOR: #fff
}
UL.dropdown A.active {
COLOR: #fff
}
UL.dropdown LI A {
PADDING-BOTTOM: 4px;PADDING-LEFT: 8px; PADDING-RIGHT: 8px; DISPLAY: block; COLOR: #fff;
}
UL.dropdown LI:unknown A {
BORDER-RIGHT-STYLE: none
}
UL.dropdown LI.hover {
POSITION: relative; COLOR: #fff
}
UL.dropdown LI:hover {
POSITION: relative; COLOR: #fff
}
UL.dropdown LI.hover A {
COLOR: #fff
}
UL.dropdown UL {
BORDER-BOTTOM: #fff 2px solid; POSITION: absolute; BORDER-LEFT: #fff 2px solid; WIDTH: 149px; VISIBILITY: hidden; BORDER-TOP: #fff 2px solid; TOP: 100%; BORDER-RIGHT: #fff 2px solid; LEFT: 0px;DISPLAY: block;
}
UL.dropdown UL LI {
LINE-HEIGHT: 20px !important; WIDTH: 149px; BACKGROUND: #000000; FLOAT: none; HEIGHT: 25px !important; FONT-SIZE: 12px; FONT-WEIGHT: normal;DISPLAY: block;
}
UL.dropdown UL LI A {
BORDER-RIGHT-STYLE: none; WIDTH: 133px;
}
UL.dropdown UL LI A.hover {
BACKGROUND-COLOR: #e8edaa; COLOR: #b53240
}
UL.dropdown UL UL {
TOP: 0px; LEFT: 100%;width:149px;DISPLAY: block;
}
UL.dropdown LI:hover > UL {
VISIBILITY: visible;DISPLAY: block;
}



                    

                            
  • 下拉列表在ie6下不显示_html/css_WEB-ITnose

  •                         
  • 下拉列表在ie6下不显示_html/css_WEB-ITnose

  •                         
  • 下拉列表在ie6下不显示_html/css_WEB-ITnose

  •                         
  • 下拉列表在ie6下不显示_html/css_WEB-ITnose

  •                         
  • 下拉列表在ie6下不显示_html/css_WEB-ITnose

  •                         
  • 下拉列表在ie6下不显示_html/css_WEB-ITnose

  •                         
  • 下拉列表在ie6下不显示_html/css_WEB-ITnose

  •                         
  • 下拉列表在ie6下不显示_html/css_WEB-ITnose

  •                         

  •                             

                                    
                  
                                          
    • 下拉列表在ie6下不显示_html/css_WEB-ITnose
                                              

            
      • 2012年
                

                      
                  

            

      •     
      • 2011年
                

                      
                              
        • 周杰

        •                 
                              
        • 张薇

        •                 
                              
        • 易贞桢

        •                 
                              
        • 夏荣丽

        •                 
                              
        • 苏春燕

        •                 
                              
        • 沈满

        •                 
                              
        • 刘佳

        •                 
                              
        • 李菁

        •                 
                              
        • 胡雨佳

        •                 
                              
        • 陈小平

        •                 
                              
        • 白盛兰

        •                 
                              
        • 杨姝红

        •                 
                  

            

      •     
      • 2007-2010
                

                      
                  

            


                                          

    •                                 

                                
                                
                            

  •                         
  • 下拉列表在ie6下不显示_html/css_WEB-ITnose

  •                         
  • 下拉列表在ie6下不显示_html/css_WEB-ITnose

  •                     

                
 


在ie6、火狐、谷歌下面都不显示 谁帮忙解决下 


回复讨论(解决方案)

  


你把这里的样式去掉试试


去掉也不行的

可以参考这个
http://www.lwis.net/free-css-drop-down-menu/

继续等待

不知道你想弄成什么效果

就简单的显示下拉列表就行了

ie6-不支持 li:hover,找个js来实现吧

同意楼上

你是想要 鼠标放上去显示下拉列表对吧。看看下面的是不是你要的。

  


    

      
    

  


#topnavall, #topnav, #topnav ul, #topnav ul li, #topnav ul li a { overflow:visible; }
#topnavall { float:left; width:900px; padding-top:200px; }
#topnav { width:900px; height:20px; background:#f7f7f7; }
#topnav ul ul { visibility:hidden; height:auto; position:absolute; background:#FFF; padding:0; margin:0; filter:alpha(opacity=90); -moz-opacity:0.9;opacity:0.9; }
#topnav ul ul { width:120px; left:0; top:20px; line-height:normal; }
#topnav li { position:relative; z-index:500; float:left; display:block; height:20px; line-height:20px; padding:0 10px; }
#topnav table { _margin-top:-5px; }
#topnav ul li a { _overflow:hidden; display:inline-block; height:20px; line-height:20px; }
#topnav ul li a:hover { border-bottom: solid 0px #000; overflow:visible; }
#topnav li:hover ul, #topnav a:hover ul { visibility:visible; line-height:normal; }
#topnav ul li ul li { width:auto; float:none; display:block; margin:0; padding:0; height:auto; background:none; line-height:normal; }
#topnav ul li ul li a { overflow:visible; width:auto; height:1%; line-height:120%; display:block; padding:5px; margin:0; float:none; text-decoration:none; text-align:left; color:#666; font-weight:normal; font-size:12px; font-family:Arial, Simsun, "Arial Unicode MS", Mingliu, Helvetica; border:solid 1px #fafafa; border-bottom-color:#eee; border-top-color:#fafafa; background:#f3f3f3; }
#topnav ul li ul li a:hover { overflow:visible; width:auto; height:1%; line-height:120%; display:block; padding:5px; margin:0; float:none; text-decoration:none; text-align:left; color:#666; font-weight:normal; font-size:12px; font-family:Arial, Simsun, "Arial Unicode MS", Mingliu, Helvetica; border:solid 1px #F90; border-bottom-color:#eee; border-top-color:#fafafa; background:#eee; }

问题就出在ie6只支持a的伪操作:hover,不支持其他的,包括li,所以建议加段jquery,或者采取别的办法使得ie6支持那个伪操作,

jq怎么写, 伪操作是怎么做的

jQuery就比较简单
$(".menu>ul>li").hover(function(){
  .....//鼠标放上去的行为(可以给子菜单增加个显示的样式)
},function(){
  .....//鼠标离开后的行为(删除鼠标放上去给子菜单增加的哪个样式)
})

或者也可以用原始javascript去弄,前提要判断一下是否能检测到这个menu样式层,

:hover就是一个伪类

可以自己随便先做个小实验。

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
What is the purpose of HTML attributes?What is the purpose of HTML attributes?May 07, 2025 am 12:01 AM

HTMLattributesareessentialforenhancingwebelements'functionalityandappearance.Theyaddinformationtodefinebehavior,appearance,andinteraction,makingwebsitesinteractive,responsive,andvisuallyappealing.Attributeslikesrc,href,class,type,anddisabledtransform

How do you create a list in HTML?How do you create a list in HTML?May 06, 2025 am 12:01 AM

TocreatealistinHTML,useforunorderedlistsandfororderedlists:1)Forunorderedlists,wrapitemsinanduseforeachitem,renderingasabulletedlist.2)Fororderedlists,useandfornumberedlists,customizablewiththetypeattributefordifferentnumberingstyles.

HTML in Action: Examples of Website StructureHTML in Action: Examples of Website StructureMay 05, 2025 am 12:03 AM

HTML is used to build websites with clear structure. 1) Use tags such as, and define the website structure. 2) Examples show the structure of blogs and e-commerce websites. 3) Avoid common mistakes such as incorrect label nesting. 4) Optimize performance by reducing HTTP requests and using semantic tags.

How do you insert an image into an HTML page?How do you insert an image into an HTML page?May 04, 2025 am 12:02 AM

ToinsertanimageintoanHTMLpage,usethetagwithsrcandaltattributes.1)UsealttextforaccessibilityandSEO.2)Implementsrcsetforresponsiveimages.3)Applylazyloadingwithloading="lazy"tooptimizeperformance.4)OptimizeimagesusingtoolslikeImageOptimtoreduc

HTML's Purpose: Enabling Web Browsers to Display ContentHTML's Purpose: Enabling Web Browsers to Display ContentMay 03, 2025 am 12:03 AM

The core purpose of HTML is to enable the browser to understand and display web content. 1. HTML defines the web page structure and content through tags, such as, to, etc. 2. HTML5 enhances multimedia support and introduces and tags. 3.HTML provides form elements to support user interaction. 4. Optimizing HTML code can improve web page performance, such as reducing HTTP requests and compressing HTML.

Why are HTML tags important for web development?Why are HTML tags important for web development?May 02, 2025 am 12:03 AM

HTMLtagsareessentialforwebdevelopmentastheystructureandenhancewebpages.1)Theydefinelayout,semantics,andinteractivity.2)SemantictagsimproveaccessibilityandSEO.3)Properuseoftagscanoptimizeperformanceandensurecross-browsercompatibility.

Explain the importance of using consistent coding style for HTML tags and attributes.Explain the importance of using consistent coding style for HTML tags and attributes.May 01, 2025 am 12:01 AM

A consistent HTML encoding style is important because it improves the readability, maintainability and efficiency of the code. 1) Use lowercase tags and attributes, 2) Keep consistent indentation, 3) Select and stick to single or double quotes, 4) Avoid mixing different styles in projects, 5) Use automation tools such as Prettier or ESLint to ensure consistency in styles.

How to implement multi-project carousel in Bootstrap 4?How to implement multi-project carousel in Bootstrap 4?Apr 30, 2025 pm 03:24 PM

Solution to implement multi-project carousel in Bootstrap4 Implementing multi-project carousel in Bootstrap4 is not an easy task. Although Bootstrap...

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools