Специально для господина Акелы:
Браузер + ОС:
IE 6.0.3790.0 (128-bit)
Microsoft Windows Server Standard Edition
CSS:
Код:
div.CascadeBody [b]div.ParentItem[/b]{
background-image: url('/global/images/menu/subitem.gif');
background-position: right;
background-repeat: no-repeat;
}
div.CascadeBody div.CascadeItemBody{
margin-left: 24px;
margin-right: 18px;
padding: 4px 0;
width: 178px;
}
div.CascadeBody a{
color: #606B59;
text-decoration: none;
}
Генерация HTML:Код:
function WriteMenuLayer(Item)
{
document.write('<div class="CascadeMenu" id="cm'+ Item.ID +'" onmouseover="OnMouseOverMenu(this, '+ Item.ID +')" onmouseout="OnMouseOutMenu(this, '+ Item.ID +')" style="z-index: '+ (Item.Depth * 10 + 10) +'">');
if(Item.Depth == 0) document.write('<div class="CascadeHeader" id="ch'+ Item.ID +'"></div>');
document.write('<div class="CascadeBody" id="cb'+ Item.ID +'" style="width:100%;'+ (Item.Depth ? 'border-top: 1px solid #606B59;' : '') +'">');
for(i = 0; i < Item.Items.length; i++)
{
SubItem = Item.Items[i];
document.write('<div id="cmi'+ SubItem.ID +'" onmouseover="OnMouseOverMenuItem(this, '+ SubItem.ID +')" onmouseout="OnMouseOutMenuItem(this, '+ SubItem.ID +')" class="'+ (SubItem.Items.length ? 'ParentItem' : 'Item' ) + '"><a href="'+ SubItem.HRef +'" title="'+ SubItem.Title +'"><div class="CascadeItemBody">'+ SubItem.Caption +'</div></a></div>');
}
document.write('</div></div>');
}
Проблема:
Центр внимания --
div.ParentItem. Его background-image грузится каждый раз при наведении на него мышкой, а следовательно приводит к "морганию" бэка при низких скоростях загрузки.