2013-10-20 58 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

相關問題