0
我的CSS菜單這是兩個層面的意思是一個主要的等是其subsequest。比如轉換CSS菜單,多層次的CSS菜單
Home--Link1
Link2
Link3
Link4
但現在我需要這個菜單擴展到更多的後續這樣
Home--Link1--SLink1
Link2 SLInk2
Link3 SLink3
Link4--Slink1
Slink2
但我無法unserstAND如何轉換菜單中的多級請任何一個可以幫助我做到這一點 以下鏈接是我的CSS代碼
#sddmSFPL
{ margin: 0;
padding: 0;
z-index: 30}
#sddmSFPL li
{ margin: 0;
padding: 0;
list-style: none;
font: 11px Tahoma}
#sddmSFPL li a
{ display: block;
margin: 0 1px 0 0;
padding: 4px 10px;
width: 100px;
background: #FFFFFF;
color: #222222;
text-align: Left;
text-decoration:none}
#sddmSFPL li a:hover
{ background: #EEEEEE;
color:#222222;
border:solid 1px #EEEEEE;
padding:3px 9px;
border-left-color:#DD4b39;
}
#sddmSFPL div
{ position: absolute;
visibility: hidden;
margin:-24px 120px;
padding:4px 10px;
background: #FFFFFF;
border: 1px solid #EEEEEE}
#sddmSFPL div a
{ position: relative;
display: block;
margin: 0 0 0 0;
padding: 4px 10px;
width: auto;
white-space:normal;
text-align: left;
text-decoration: none;
background: #FFFFFF;
color: #222222;
font: 11px Tahoma}
#sddmSFPL div a:hover
{ background: #EEEEEE;
color: #222222;
padding:3px 9px; }
在這裏,許多事情我想轉換成多級
<ul id="sddmSFPL">
<li>
<a href="#" id="MilkReports" runat=server >Milk Reports</a>
<div id="m29" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
<a href="http://sml.com.pk/sfpl/milk.php" target=_blank >Milk Receipt Dashboard</a>
<a href="http://foods.shakarganj.com.pk/pdf/procurement_structure.pdf" target=_blank> Milk Procurement Structure</a>
</div>
</li>
</ul>
在這裏,在菜單中的鏈接是我的JS代碼來打開和關閉menues
<!--
var timeout = 2000;
var closetimer = 0;
var ddmenuitem = 0;
// open hidden layer
function mopen(id)
{
// onmouseover="timer1=setTimeout(function(){show('tip1');}, 500);"
//onmouseout="clearTimeout(timer1);"
// cancel close timer
mcancelclosetime();
// close old layer
if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
// get new layer and show it
ddmenuitem = document.getElementById(id);
ddmenuitem.style.visibility = 'visible';
}
// close showed layer
function mclose()
{
if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
}
// go close timer
function mclosetime()
{
closetimer = window.setTimeout(mclose, timeout);
}
// cancel close timer
function mcancelclosetime()
{
if(closetimer)
{
window.clearTimeout(closetimer);
closetimer = null;
}
}
// close layer when click-out
//document.onmouseover = mclose;
// -->