Bootstrap面板模板

时间:2016-02-22 22:28:34

标签: html css html5 twitter-bootstrap css3

我们是新来的bootstrap,并尝试创建一个pannel模板,但是我很沮丧,我真的没有得到任何地方,有人可以向我解释如何得到其余的,我很接近但是现在就试着把剩下的东西放进去。

This is what i am trying to create. I have done some of it but i just cant seem to get the rest of it right. Any help on this topic would be great. Thanks

Code

<div id="mainContainer" class="container">
    <div class="panel panel-default">
        <div class="panel-heading">Panel Title</div>
        <div class="panel-body">
            <div class="row">
                <div class="col-lg-2 col-md-3 col-sm-4 col-xs-6">
                    <div class="panel panel-default">
                        <div class="panel-heading">Item 01</div>
                        <div class="panel-body"><img src="http://placehold.it/150x150" alt="" class="img-responsive" />
                    </div>
                </div>                
            </div>
        </div>
    </div>
</div>

谢谢你们的帮助。

1 个答案:

答案 0 :(得分:1)

从您的图片中,您似乎想要在内部面板旁边创建一个列表。

易。只需创建另一个div,并设置网格列值。

      <div class="row">
        <div class="col-lg-2 col-md-3 col-sm-4 col-xs-6">
          <div class="panel panel-default">
            <div class="panel-heading">Item 01</div>
            <div class="panel-body"><img src="http://placehold.it/150x150" alt="" class="img-responsive" />
            </div>
          </div>
        </div>
        <!-- Setting the column values so the totals equal 12 -->
        <div class="col-lg-10 col-md-9 col-sm-8 col-xs-6">
          <h4>
          List Title
          </h4>
          <ul class="list-group">
            <li class="list-group-item">Item One</li>
            <li class="list-group-item">Item Two</li>
          </ul>
        </div>
      </div>

jsfiddle