bootstrap导航栏不能在真实设备上工作

时间:2013-08-11 11:36:49

标签: twitter-bootstrap typo3 navbar

我的bootstrap有问题。

我正在使用typo3并拥有2个文件,defaultLayout和root.t3s:

root.t3s

    page = PAGE
page {
    includeCSS {
        file1 = path/bootstrap/css/bootstrap.min.css

        file3 = path/bootstrap/css/bootstrap-responsive.min.css
    }

    includeJS {
        file4 = path/bootstrap/css/bootstrap.min.js

    }

    10 = FLUIDTEMPLATE
    10 {
        file.cObject = CASE
        file.cObject {
            key {
                data = levelfield: -1, backend_layout_next_level, slide
                override.data = TSFE:page|backend_layout
            }
            default = TEXT
            default.value = path/Templates/3columns.html

            1 = TEXT
            1.value = path/Templates/homepage.html

            2 = TEXT
            2.value = path/Templates/2columns.html

        }

        partialRootPath = path/Partials/
        layoutRootPath = path/Layouts/
        variables {
            companylogo = TEXT
            companylogo.value = <a class="navbar-brand" href="#">Project</a>

            copyright = TEXT
            copyright {
                value = Copyright © Project {date:Y}
                insertData = 1
        }
        navigation_level1 =< lib.navigation_levl1
        navigation_level2 =< lib.navigation_levl2
        content_0 < styles.content.get
        content_1 < styles.content.getLeft
        content_2 < styles.content.getRight
        content_3 < styles.content.getBorder

        content_5 < styles.content.get
        content_5.select.where = colPos = 5
    }

    3000 = TEXT
    3000.value {
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="path/JavaScript/jquery-1.9.1.min.js"><{\/script>')</script>
<script src="path/bootstrap/css/bootstrap.min.js"></script>
<script>window.bootstrap || document.write('<script src="path/bootstrap/css/bootstrap.min.js"><{\/script>')</script>
    }
}

这是我的defaultLayout:

<div class="navbar navbar-inverse navbar-fixed-top">
  <div class="container">
    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
    </button>
    <a class="navbar-brand" href="#">Project name</a>
    <div class="nav-collapse collapse">
      <ul class="nav navbar-nav pull-right">
        <li class="active"><a href="#">Home</a></li>
        <li><a href="#about">About</a></li>
        <li><a href="#contact">Contact</a></li>
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
          <ul class="dropdown-menu">
            <li><a href="#">Action</a></li>
            <li><a href="#">Another action</a></li>
            <li><a href="#">Something else here</a></li>
            <li class="divider"></li>
            <li class="nav-header">Nav header</li>
            <li><a href="#">Separated link</a></li>
            <li><a href="#">One more separated link</a></li>
          </ul>
        </li>
      </ul>
    </div><!--/.nav-collapse -->
  </div>
</div>

defaultLayout取自here

现在问题,如果我在桌面上的普通浏览器中显示它工作正常。但是,如果我在iphone或者nexus上的移动浏览器中测试这个网站,它不显示折叠菜单(它看起来像在普通的浏览器中)。

在google上搜索后,我发现了一个工具,可以将浏览器的大小调整为移动尺寸,在此菜单看起来就像我预期的那样(折叠菜单显示但右边的按钮打开菜单无法正常工作。

来自浏览器工具的

thats看起来不错,但右侧的按钮无法点击

来自我手机的

thats ....

我不知道我做错了什么,我希望有人有建议。

提前感谢。

问候

0 个答案:

没有答案