2013-10-20 205 views
1

我有一个PhoneGap应用程序,我使用Bootstarp进行布局和样式设计。问题是,当我在Nexus 4模拟器(分辨率768x1280)上运行应用程序时,Bootstrap将其视为桌面,并将小导航栏显示为标题,而不是右侧的下拉菜单。我的index.html标头如下:Twitter Bootstrap导航栏下拉菜单不起作用

<head> 
    <meta charset="utf-8" /> 
    <meta name="format-detection" content="telephone=no" /> 
    <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" /> 
    <link rel="stylesheet" type="text/css" href="css/bootstrap.css" /> 
    <link rel="stylesheet" type="text/css" href="css/bootstrap-theme.css" /> 
    <link rel="stylesheet" type="text/css" href="css/index.css" /> 
    <title>Hello World</title> 
</head> 

它主要是由PhoneGap生成的。我的目标是把它带到这 enter image description here

回答

1

默认情况下,grid-float-breakpoint(在variables.less中定义)设置为768px。这意味着显示宽度为> = 768px的所有屏幕的“桌面”(折叠)版本。正如你提到你的测试屏幕将在这个范围内。 因此,在变量free.less中将@ grid-float-breakpoint更改为低于768px的值,并重新编译bootstrap(或使用customizer来执行此操作)。

另请阅读http://bassjobsen.weblogs.fm/compile-twitters-bootstrap-3-without-responsive-features/查看@ grid-float-breakpoint不影响所有设置。

要将下拉菜单更改为其移动版本,另请参阅https://stackoverflow.com/a/18944192/1596547

相关问题