框架集中的重叠下拉菜单

时间:2016-03-01 09:27:44

标签: html css

如何重叠框架集中的下拉菜单项?

框架集页面

<html>
<FRAMESET rows="18%,*" frameborder="YES"> 
  <frame src="frame_header.htm">
<frameset rows="*" frameborder="YES" border="1" framespacing="1" cols="*">
  <frame src="frame_content.htm">
</frameset>
</html>

frame_header

<BODY style="background-color:#005555;border:0px solid black;">
<form name="mainfrm" method="post" >
<br/><br/>
<div class="drop" >
<ul class="drop_menu" >
<li><a href='#'>Link 1</a>
    <ul>
    <li><a href='#'>Sub Link 1</a></li>
    <li><a href='#'>Sub Link 2</a></li>
    <li><a href='#'>Sub Link 2</a></li>
    <li><a href='#'>Sub Link 3</a></li>
    <li><a href='#'>Sub Link 4</a></li>
    </ul>
</li>
<li><a href='#'>Link 2</a>
    <ul>
    <li><a href='#'>Sub Link 1</a></li>
    <li><a href='#'>Sub Link 2</a></li>
    <li><a href='#'>Sub Link 3</a></li>
    <li><a href='#'>Sub Link 4</a></li>
    </ul>
</li>
</ul>
</div>
</form>
</BODY>

CSS

.drop_menu {
    background:#005555;
    padding:0;
    margin:0;
    list-style-type:none;
    height:30px;
}
.drop_menu li { float:left; }
.drop_menu li a {
    padding:9px 20px;
    display:block;
    color:#fff;
    font:12px arial, verdana, sans-serif;
}
* Submenu */
.drop_menu ul {
    position:absolute;
    left:-9999px;
    top:-9999px;
    list-style-type:none;
}
.drop_menu li:hover { position:relative; background:#5FD367; }
.drop_menu li:hover ul {
    left:0px;
    top:30px;
    background:#5FD367;
    padding:0px;
}

.drop_menu li:hover ul li a {
    padding:5px;
    display:block;
    width:168px;
    text-indent:15px;
    background-color:#5FD367;
}
.drop_menu li:hover ul li a:hover { background:#005555; }

/

当前布局

enter image description here

0 个答案:

没有答案