0

我离开我的电脑,回到导航栏的问题。它工作正常,现在不行了。导航栏中的各个选项卡仍然有效,但它不显示哪个选项卡处于活动状态。尽管我可能在主页、浏览或开始页面上,“关于我们”选项卡仍以粗体显示(活动)。我不确定如何解决这个问题。导航栏的代码如下。任何帮助将不胜感激。谢谢!

        .span2
            = link_to image_tag("company_logo.png", class: "brand", style: "margin-top: 10px;"), static_pages_home_page_path
        .span7
            %ul.nav.nav-tabs
                %li.active#about
                    = link_to "About Us", static_pages_about_path, id: "about"
                %li#browse
                    = link_to "Browse", static_pages_browse_path, id: "browse"
                %li#start
                    = link_to "Start", static_pages_start_project_path, id: "start"
                %li#blog                    
                    = link_to "Blog", '#', id: "blog"           
4

1 回答 1

0

“活动”短语已从“关于我们”选项卡中删除。这从导航栏中删除了锚点。感谢@Juri Glass 和 RobHeaton。

        %ul.nav.nav-tabs
            %li.active#about
                = link_to "About Us", static_pages_about_path, id: "about"
            %li#browse
                = link_to "Browse", static_pages_browse_path, id: "browse"
            %li#start
                = link_to "Start", static_pages_start_project_path, id: "start"
            %li#blog                    
                = link_to "Blog", '#', id: "blog" 
于 2013-05-31T13:34:07.493 回答