Codeigniter--add “active” css class to link, how to?

后端 未结 5 2214
走了就别回头了
走了就别回头了 2021-02-09 15:02

What\'s the quickest and easiest way to add the \"active\" class to a link, so it can be styled? I\'m developing an app in CI, and I\'d like a quick easy way to do this automat

5条回答
  •  伪装坚强ぢ
    2021-02-09 16:01

    If you have a lot of navigation items you can do it this way (very simplified)...

    
    

    You'll have to edit it for your needs...

    If you don't have that many nav items an easier way is to give each page a body id and then use css to make it active.

    
    
    
    
    
    

提交回复
热议问题