本文介绍了菜单控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这在IE 8中不起作用.
This is not working in IE 8..
<asp:Menu ID="Menu2" runat="server" DataSourceID="xmlDataSource" Orientation="Horizontal"
ScrollDownImageUrl="~/images/arrv_white.gif" DynamicPopOutImageUrl="~/images/drop-arrow.gif"
StaticPopOutImageUrl="~/images/drop-arrow.gif" ForeColor="#8B8B8B" MaximumDynamicDisplayLevels="1"
Font-Size="10px" OnMenuItemClick="Menu1_MenuItemClick">
<DynamicItemTemplate>
<%# Eval("text") %>
</DynamicItemTemplate>
<DataBindings>
<asp:MenuItemBinding DataMember="MenuItem" NavigateUrlField="Url" TextField="MenuName" />
</DataBindings>
<LevelMenuItemStyles>
<asp:MenuItemStyle CssClass="level1" />
<asp:MenuItemStyle CssClass="level2" />
</LevelMenuItemStyles>
</asp:Menu>
这是我的CSS ..
This is my CSS..
.level1
{
font-variant:normal;
color:#5C4F21;
font-family:Tahoma;
font-size:12px;
font-weight:bold;
background-color:#FDF3D6;
background-image: url(images/bg_Menu.png);
padding: 2px 2px 2px 2px;
height:21px;
width:150px;
text-align:center;
border: Solid 1px #E3D9B3;
}
.level1:hover
{
color: #5C4F21;
background-color: #FDF3D6;
background-image: url(images/bg_MenuHover.png);
height:21px;
width:150px;
}
.level2
{
color:#5C4F21;
font-family:Tahoma;
font-size: 12px;
background-color:#FFFDF4;
text-align:left;
padding:4px 8px 4px 8px;
height:22px;
border: Solid 1px #E3D9B3;
}
.level2:hover
{
background-color:#FDF3D6;
color: #5C4F21;
}
推荐答案
.adjustedZIndex {
z-index: 1;
<DynamicMenuStyle CssClass="adjustedZIndex" />
这篇关于菜单控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!