5

我的 Twitter Bootstrap 移动页面有一个固定顶部的导航栏

<div class="navbar navbar-fixed-top">

我希望方向更改事件会在移动设备上触发导航栏的“调整大小”(桌面上的调整大小事件确实会正确触发导航栏的调整大小)。在导航栏的右侧,我有一个可折叠的导航栏开关,它可以打开/关闭主菜单:当从横向更改为纵向时,菜单按钮不再可见,这是一场灾难......

该问题也可以通过官方 navbar-fixed-top 示例(在http://getbootstrap.com/examples/navbar-fixed-top/)进行验证。

我在装有 Android 4.1.2 的三星 Galaxy S3 上使用库存(默认)浏览器。

iPhone (3) 浏览器不会出现此问题。

更新: Android 4.3 仍然存在此问题。

4

1 回答 1

0

Not sure what you mean. but write up your own CSS with all your Size stuff and add !important after it and before the ; Something like this:

.navbar-whatever {
whateverSizeCode = 0 !important;
whateverSizeCode2 = 0 !important;
}

Put Mobile tags for Twitter Bootstrap. Here is a link for you: http://getbootstrap.com/css/#overview-mobile

Mobile Code for you. Add this in your tag

<!-- Scroll Enabled --> 
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Scroll Disabled -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

Note: Use any one of the two lines.

Also make sure that in your HTML you do this:

<style rel="stylesheet" link="bootstrap.css">
<style rel="stylesheet" link="yourCSS.css">

What this will do is Put your styles and sizes in a way that Bootstrap is read by the code first then your CSS so that it does not override your CSS. Hope so I Helped. Ask me again and be more specific.

于 2014-05-14T12:38:43.023 回答