我花了很多时间在Foundation上,而花在Bootstrap上的时间却很少。我不明白Bootstrap的响应性有什么问题,因为它似乎只在Foundation上起作用。问题是,虽然网格响应性按预期工作,但我的字体被缩放得太小,以至于在移动的上几乎难以辨认。请注意,在下面的示例中,我将字体大小设置为14px。但在移动的上,这变得非常微小。你可以通过点击Chrome开发工具中的移动按钮来看到这一点。
用html来重现这个很简单,下面是一个jsbin:http://jsbin.com/lumepumufu/1/
下面是html:
<html>
<head>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
</head>
<body style="font-size:14px">
<div class="container">
<div class="row">
<div class="col-lg-4">col-lg-4</div>
<div class="col-lg-4">col-lg-4</div>
<div class="col-lg-4">col-lg-4</div>
</div>
</div>
</body>
</html>
6条答案
按热度按时间olmpazwi1#
Bootstrap是移动的优先的。移动优先样式可以在整个库中找到,而不是在单独的文件中。
为了确保正确的渲染和触摸缩放,请将viewport meta标签添加到head中
hs1rzwqc2#
您应该始终从模板开始,例如“基本模板”(http://getbootstrap.com/getting-started/#template)。这可以正常工作:
这可能看起来像很多“cruft”,但一切都是有原因的。
uajslkp63#
如果您运行的是Rails应用程序,可以尝试gem rails_layout
t3irkdon4#
我遇到了小字体和小导航栏的问题,我的问题是在css中设置导航栏宽度,使用最大宽度而不是仅仅宽度解决了我的缩放问题
0kjbasz65#
使用“rem”代替px;(像素);例如.myclass {字体大小:1雷姆; }
umuewwlo6#
我遇到了这个问题,我的问题最终是我正在使用的代码格式化程序。它用“/"结束标记,这导致我的程序不使用标记。具体来说: