答案 0 :(得分:1)
.block1{
background: red;
height: 150px;
padding-top: 30%;
}
.block2{
background: green;
height: 150px;
padding-top: 30%;
}

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<div class="col-xs-12 text-center">
<div class="col-xs-6">
<div class="block1">
text
</div>
</div>
<div class="col-xs-6">
<div class="block2">
text
</div>
</div>
</div>
&#13;
答案 1 :(得分:0)
你可以使用float:left为父div中的2个div
答案 2 :(得分:0)
试试这个html + bootstrap可以正常用于移动视图:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-sm-4">
Image 1
</div>
<div class="col-sm-4">
Image 2
</div>
<div class="col-sm-4">
Image 3
</div>
</div>
</div>
</body>
</html>