当前页面链接样式 [英] current page link style

查看:83
本文介绍了当前页面链接样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个动态菜单,管理员可以对其进行编辑,它在单个页面中声明,每次单击一个菜单项时都会重定向并更改查询字符串。我怎么能改变这样一个菜单的css样式,如果一个子菜单点击了父菜单应该设置为当前感谢

I have a dynamic menu that an admin can edit it it is declared in a single page that redirect itself every time a menu item is clicked and change the query string. how could i change the css style of such a menu note that if a sub menu clicked the parent one should be set as current thanks

推荐答案

创建2个CSS类说' menusedlected'和'menunotselected'。按照您希望显示所选菜单的方式设置第一个样式,为非选择菜单设置另一个样式。

当用户选择菜单时,将其css类更改为menuseleted和所有其他菜单默认会有'menunotselected'等级。



希望有所帮助!
Create 2 CSS classes say 'menuselected' and 'menunotselected'. Style the first one in the way you want selected menu to be shown and the other one for non selected menu.
When the user selects a menu, change it's css class to 'menuseleted' and all other menu will have class 'menunotselected' by default.

Hope that helps!


这篇关于当前页面链接样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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