0
有一個problom當鼠標懸停在列表中的深列表顯示在頁面的頂部,請幫我傢伙如何解決鏈接的位置在鼠標懸停
下面是HTML代碼
<div id="mymenu" runat="server" >
<ul class="mainmenu">
<li><a>WorkFlow</a>
<ul class="submenu">
<li><a href="# >Employee Apprisail Report</a></li>
<li><a href="#">Attendance Amendment Status Report</a></li>
<li><a href="#">Employee Requisition Report</a></li>
<li><a href="#">Employee Clearance Report</a></li>
<li><a href="#">Employee Hiring Status Report</a></li>
<li><a href="#">Housing Loan Status Report</a></li>
<li><a href="#">Leave Request Annulal Leave Amendments</a></li>
<li><a href="#">Leave Request Annulal Leave Cancellation</a></li>
<li><a href="#">Mobile Allowance Status Report</a></li>
<li><a href="#">Overtime Status Report</a></li>
</ul>
</li>
<li><a>HR</a>
<ul class="submenu">
<li><a href="#">Iqama Report</a></li>
<li><a href="#>Project Time Attendance System</a></li>
<li><a href="#」>Vacation Balance Report</a></li>
<li><a href="#">Electronic Human Resource Mangment System</a></li>
</ul>
</li>
<li><a>Payroll</a>
<ul class="submenu">
<li><a href="#">Manual Attendance System/User Register</a></li>
<li><a href="#">Manual Attendance System Approve/Reject</a></li>
<li><a href="#">Check Print/Report</a></li>
<li><a href="#">Head Of Departmens Attendance Amendment</a></li>
<li><a href=」#">Overtime Payroll Application</a></li>
<li><a href="#">Salary Increment Status Report</a></li>
<li><a href="#」>Payroll Reconciliation Report</a></li>
</ul>
</li>
</ul>
</div>
這裏是我的CSS
ul.mainmenu:
{
list-style:none;
}
ul.mainmenu li
{
display: inline-block;
}
ul.mainmenu li a {
text-decoration: none;
background: #ff005a;
color: #fff;
padding: 0.25em;
}
ul.mainmenu li a:hover {
background: #ff00ff;
}
ul.mainmenu li ul.submenu {
list-style: none;
display: none;
}
ul.mainmenu li:hover > ul.submenu {
position: absolute;
display: inline-block;
top: 40px;
}
你能讓我們成爲一個jsfiddle嗎? –