2015-11-07 26 views
0

我正在尝试为网站制作一个下拉菜单。下拉菜单与许多其他下拉菜单不同,但每次将光标放在子类别上时,都会关闭下拉菜单和子类别。请尝试修复它。这里是代码:每当我把光标放在子类别上时,它会关闭下拉菜单和子类别链接

<style type="text/css"> 

    a:link { 
    color: black; 
    } 


    a:visited { 
    color: black; 
} 


a:hover { 
    color: lightBlack; 
} 


a:active { 
    color: gray; 
} 

a { 
    text-decoration: none; 

} 



a.rel { 
    position: relative; 


    } 

.sa { 
    color:white; 

    } 
.sd { 
border-right-style:visible;border-right-width:1px; border-bottom- style:visible        
border-bottom-color:black; border-bottom-width: 5px; 
background-color: #040404; 
border-bottom:#040404; 
border-right: solid 2px; 
border-right-color:gray; 
} 
</style> 
<style type="text/css"> 

a:link { 
    color: black; 
} 


a:visited { 
    color: black; 
} 


a:hover { 
    color: lightBlack; 
} 


a:active { 
    color: gray; 
} 

a { 
    text-decoration: none; 

} 



rel { 
    position: relative; 


} 

.sa { 
    color:white; 

    } 
.sd { 
    border-right-style:visible;border-right-width:1px; border-bottom-style:  visible; 
    border-bottom-color:black; border-bottom-width: 5px; 
    background-color: #040404; 
    border-bottom:#040404; 
    border-right: solid 2px; 
    border-right-color:gray; 
    } 
</style> 
<font size="5"> 
<img src = "chan-art2.png" cellspacing="0" border="0"/><br/> 
<style type="text/css"> 
a:link { 
     color: white; 
} 


a:visited { 
     color: white; 
} 


a:hover { 
     color: #AEAEAE; 
     transition: color 0.3s; 
} 
a:active { 
    color: white; 
} 

#text1 a:hover { 
    font-size:20px; 
    color: black; 
    transition-timing-function: ease-out; 
    transition: font-size .5s,color .5s; 


    } 
    span#menuspan:hover { 
     padding-bottom: 300px; 
     padding-right: 100px; 
     border-bottom-style:visible; 
     border-bottom-color: gray; 
     border-bottom: block 2px; 
     position: absolute; 
     -webkit-transition-timing-function: ease-out; 
     transition: padding-bottom .6s, padding-right .5s; 


} 



</style> 
<div> 
<span class="sd"><a cellspacing="0"   href="#no_link_so_far_put_one_here">About</a></span><span onmouseout="iv()" onmouseover="univ()" cellspacing="0" id="menuspan" class="sd"><a 
href="index.html">Home</a><br/></span><br/> 
<div style="padding-left: 70px;"> 
<a id="newr" style="position:absolute; visibility:hidden; margin-top: none;border:none;" href="#" >New Releases</a> 
</div> 
</font> 
</div> 

回答

0

嗯,我想我知道这个问题。该子类不是下拉菜单的一部分,所以每当我将鼠标悬停在它上面时,它都会注册我没有在菜单上悬停,然后关闭它。幸运的是,我得到了另一种方法,所以我不再需要太多的帮助。