Jim*_*per 35 html css twitter-bootstrap
我花了很多时间和基金会一起工作,而没有多少时间使用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>
Run Code Online (Sandbox Code Playgroud)
zia*_*rog 87
Bootstrap首先是移动的.移动的第一个样式可以在整个库中找到,而不是在单独的文件中找到.
要确保正确渲染和触摸缩放,请将视口元标记添加到您的头部
<meta name="viewport" content="width=device-width, initial-scale=1">
Run Code Online (Sandbox Code Playgroud)
the*_*orn 68
您应该始终从模板开始,例如"基本模板"(http://getbootstrap.com/getting-started/#template).这按预期工作:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap 101 Template</title>
<!-- Bootstrap -->
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</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>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
它似乎有点像"残酷",但一切都是有原因的.
| 归档时间: |
|
| 查看次数: |
24831 次 |
| 最近记录: |