菜单选择的项目颜色
问题描述:
谁能告诉我单击菜单项后Selected(动态/静态)菜单项样式不变的原因吗?
Hi,
Can anyone tell me the reason why the Selected(Dynamic/Static) menu item style doesn''t change if clicked on the menu item?
<asp:Menu ID="m1" runat="server" MaximumDynamicDisplayLevels="3"
Orientation="Horizontal">
<staticmenuitemstyle cssclass="StatMenuItemStyle" />
<staticselectedstyle cssclass="StatSelectedStyle" />
<items>
<asp:MenuItem NavigateUrl="~/one.aspx" Text="one" Value="a">
<asp:MenuItem NavigateUrl="~/two.aspx" Text="two" Value="b">
<asp:MenuItem NavigateUrl="~/three.aspx" Text="three" Value="c">
</items>
我添加了样式表以更改字体颜色和背景样式.但是,如果要进行导航,请说"one.aspx"到"two.aspx",菜单项"two"的样式不会改变
在此先感谢
I ahve added the stylesheet to change the font color and background style.But if it is navaigating from, say "one.aspx" to "two.aspx" the menu item "two"''s style doesnt change
Thanks in advance
答
可能在样式表的代码(CSS)中出现.请看下面的文章.
菜单控件所选项目的颜色根据选择而改变 [
May be issue in your code(CSS) in the stylesheet. Look at the below article.
Menu Control Selected Item Color Change Depending on Selection[^]