我刚刚开始学习bootstrap,我有col
的问题,即使它们在同一行,也没有显示内联。
代码:
<div class="container">
<div class="row">
<div class="col-sx-6">
<h2>Lorem Ipsum Dolor</h2>
<p>
Sit amet something else.
</p>
</div>
<div class="col-sx-6">
<img src="http://www.irealb.com/wp-content/uploads/2012/08/half-iphone-player.png" width="250px" alt="Iphone">
</div>
</div>
</div>
预期结果:http://i.imgur.com/KygHf0g.png
实际结果:http://i.imgur.com/2bR6fXg.png
JSfiddle:http://jsfiddle.net/ojhLm1vt/
我按以下方式包含Bootstrap:
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" media="screen">
答案 0 :(得分:3)
它是col-xs-*
,而不是col-sx-*
。
<强> FIDDLE 强>
<div class="container">
<div class="row">
<div class="col-xs-6">
<h2>Lorem Ipsum Dolor</h2>
<p>
Sit amet something else.
</p>
</div>
<div class="col-xs-6">
<img src="http://www.irealb.com/wp-content/uploads/2012/08/half-iphone-player.png" width="250px" alt="Iphone">
</div>
</div>
</div>