菜单选择的项目颜色 [英] Menu selected item color

查看:71
本文介绍了菜单选择的项目颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




谁能告诉我单击菜单项后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[^]


这篇关于菜单选择的项目颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆