答案 0 :(得分:1)
你应该这样做 -
在两个相同宽度的列中包装你的内容,这两个列都应该在行div
中
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style type="text/css">
</style>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-lg-6 col-xs-6" style="background-color: red; height:300px;"></div>
<div class="col-xs-6" style="background-color: blue; height:300px;"></div>
</div>
</body>
</html>
尝试本教程以了解bootstrap -