导航栏链接在iOS和Android中不起作用

时间:2014-10-20 16:31:52

标签: android html ios ruby-on-rails-3 twitter-bootstrap

我有一个我编程过的网站。一切都可以从Internet Explorer和Chrome / Firefox从计算机上运行。但是如果你去Android或IOS设备我的导航菜单在子菜单的

上不起作用

我使用chrome设备模拟器调试测试了网站,一切都在那里工作。

但是当我使用IE或Chrome试用手机时,子菜单链接无法点击

在此图片中,带有黄色框的链接可用,但子菜单中的链接不“仅在实际上在Android / IOS设备上

Navigation Bar

这是我的相关编码:

的CSS:

@import "twitter/bootstrap/bootstrap";
body { padding-top: 50px; }

@import "twitter/bootstrap/responsive";

// Set the correct sprite paths
@iconSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings.png');
@iconWhiteSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings-white.png');

// Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines)
@fontAwesomeEotPath: font-url("fontawesome-webfont.eot");
@fontAwesomeEotPath_iefix: font-url("fontawesome-webfont.eot?#iefix");
@fontAwesomeWoffPath: font-url("fontawesome-webfont.woff");
@fontAwesomeTtfPath: font-url("fontawesome-webfont.ttf");
@fontAwesomeSvgPath: font-url("fontawesome-webfont.svg#fontawesomeregular");

// Font Awesome
@import "fontawesome/font-awesome";

// Your custom LESS stylesheets goes here
//
// Since bootstrap was imported above you have access to its mixins which
// you may use and inherit here
//
// If you'd like to override bootstrap's own variables, you can do so here as well
// See http://twitter.github.com/bootstrap/less.html for their names and documentation
//
// Example:
// @linkColor: #ff0000;
@heroUnitHeadingColor: @white;
@heroUnitLeadColor: @white;
@navbarBackground: #122040;
@navbarBackgroundHighlight: #223D7A;
@navbarHeight: 40px;
@navbarLinkColor: @white;
@navbarLinkColorHover: yellow;
@navbarLinkColorActive: @navbarLinkColorHover;
@navbarLinkBackgroundActive: transparent;
@shadow: 3px 3px 5px 6px #ccc;
.navbar .nav > li > a {
  font-size:17px;
}

.black{
  color: black;
  font-size: 18px;
  font-style: bold
}
.well{
  background: #e6e6e6;
  -moz-box-shadow:    @shadow;
  -webkit-box-shadow: @shadow;
  box-shadow:         @shadow;
}

.navbar .nav .pull-left{
  left: 1%;
  float:none;
}

//.icon-pencil::before,.icon-exclamation-sign::before,.icon-file::before,.icon-search::before,.icon-thumbs-up::before,.icon-book::before,.icon-briefcase::before,.icon-question-sign::before,.icon-comment::before,.icon-chevron-right::before, .icon-home::before, .icon-user::before,{
    //content: "";
//}
@media (min-width: 1200px) {
  .span12, .container {
    width: 1375px;
    padding: none;
  }
}

HTML

.navbar.navbar-fixed-top
  .navbar-inner
    .container-fluid
      %a.btn.btn-navbar{"data-toggle"=>"collapse","data-target"=>".nav-collapse"}
        %span.icon-bar
        %span.icon-bar
        %span.icon-bar
      .nav.pull-left
        %a.nav.loadmaxlogo{:href => "/"}
          %img{:src=>"/assets/loadmax_logo2.png", alt: "#1 Loadboard on the net."}
      .nav-collapse.collapse
        -if user_signed_in?
          %ul.nav
            %li
              %a{:href => "/"}
                %i.icon-home.icon-white 
                Home
          %ul.nav
            %li.dropdown
              %a.dropdown-toggle{"data-toggle"=>"dropdown", :href=>"#"}
                Search
                %i.caret
              %ul.dropdown-menu
                %li
                  %a{:href => "/searches/new?search_type=ezsearch"}
                    EZ Search
                %li
                  %a{:href => "/searches/new"}
                    Advanced Search
                -if current_user.account_manager? || current_user.admin?
                  %li
                    %a{:href => "/find_user"}
                      User Search
                  %li
                    %a{:href => "/containers"}
                      Add Container Notifiers
          %ul.nav
            %li.dropdown
              %a.dropdown-toggle{"data-toggle"=>"dropdown", :href=>"#"}
                Post
                %i.caret
              %ul.dropdown-menu.no-collapse
                %li
                  %a{:href => "/loads/new"} Post a Load
                %li
                  %a{:href => "/loads/post_many"} Post Many Loads
                %li
                  %a{:href => "/trucks/new"} Post a Truck
                %li
                  %a{:href => "/trucks/post_many"} Post Many Trucks
          %ul.nav
            %li.dropdown
              %a.dropdown-toggle{"data-toggle"=>"dropdown", :href=>"#"}
                Help
                %i.caret
              %ul.dropdown-menu.no-collapse
                %li
                  %a{:href => "/info/help"} How to Autopost
                %li
                  %a{:href => "/info/help#post"} How to Post
                %li
                  %a{:href => "/info/help#search"} How to Search
                %li
                  %a{:href => "/info/help#equipmentguide"} Equipment Guide
                %li
                  %a{:href => "/info/help#faq"} FAQ
                %li
                  %a{:href => "/info/help#termsofservice"} Terms of Service
            %li
              %a{:href => "/info/contact"} Contact Us
          .nav.pull-right
            %ul.nav
              %li.dropdown.pull-right
                %a.dropdown-toggle{"data-toggle"=>"dropdown", :href=>"#"}
                  %i.icon-user.icon-white
                  My Account
                  %i.caret
                %ul.dropdown-menu.no-collapse
                  %li
                    %a{:href => "/users/#{current_user.id}/posts"} My Posts
                  %li
                    %a{:href => "/users/#{current_user.id}/covered"} Covered Posts
                  %li
                    %a{:href => "/users/leads"} Saved Posts
                  %li
                    %a{:href => "/users/#{current_user.id}/edit"} Account Preferences
                  %li
                    %a{:href => "/notifications"} Notifiers
                  %li
                    %a{:href => "/documents/#{current_user.id}"} My Documents
                  -if (current_user.company_manager && current_user.normal?) || current_user.account_manager?  || current_user.admin?
                    %li
                      %a{:href => edit_payment_info_path(current_user.company.id)} Update Payment Info
                  -if current_user.admin? or current_user.account_manager?
                    %li
                      %a{:href => "/testimonials"} Testimonials
                  -if (current_user.company_manager && current_user.free?) || current_user.account_manager? || current_user.admin?
                    %li
                      %a{:href => "/subscription_upgrades/#{current_user.company.id}/edit"} Upgrade Subscription

            %li.divider-vertical
            %li
              =link_to "Logout", destroy_user_session_path, :method => :delete
        -else
          .nav.pull-left
            %ul.nav
              %li
                %a{:href => "/"}
                  %i.icon-home.icon-white
                  Home
            %li
              %a{:href => "/features/show"} Features
            %li
              %a{:href => "/info/contact"} Contact Us
          .nav.pull-right
            %li
              %a{:href => "/users/sign_up"}
                %i.icon-user.icon-white
                Sign Up
            %li.divider-vertical
            %li
              =link_to "Login", new_user_session_path 

0 个答案:

没有答案