设置bootstrap列高度与宽度

时间:2016-08-29 11:46:07

标签: html css twitter-bootstrap

如何在演示中将红色背景区域设置为与宽度相同的高度?

演示: https://jsfiddle.net/tv0b5m3b/

/* Latest compiled and minified CSS included as External Resource*/

/* Optional theme */
@import url('//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-theme.min.css');

body {
    margin: 10px;
}
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<div class="container">

      <div class="row">
      	  <div class="col-sm-12">

            <div class="col-sm-3 col-xs-6" style="background:red;">
              <button type="button" class="btn btn-default btn-lg text-center"><i class="icon-cog icon-4x"></i><br>Resend</button>
            </div>

            <div class="col-sm-3 col-xs-6">
              <button type="button" class="btn btn-default btn-lg text-center"><i class="icon-cog icon-4x"></i><br>Resend</button>
            </div>

            <div class="col-sm-3 col-xs-6">
              <button type="button" class="btn btn-default btn-lg text-center"><i class="icon-cog icon-4x"></i><br>Resend</button>
            </div>

            <div class="col-sm-3 col-xs-6">
              <button type="button" class="btn btn-default btn-lg text-center"><i class="icon-cog icon-4x"></i><br>Resend</button>
            </div>

https://jsfiddle.net/tv0b5m3b/

1 个答案:

答案 0 :(得分:0)

https://jsfiddle.net/vivekkupadhyay/tv0b5m3b/1

&#13;
&#13;
>>> print repeat_iterable([1, 2, 3, 4], 10)
[1, 2, 3, 4, 1, 2, 3, 4, 1, 2]
>>> print repeat_iterable([1, 2, 3, 4], 3)
[1, 2, 3]
>>> print repeat_iterable([1, 2, 3, 4], 0)
[]
>>> print repeat_iterable([1, 2, 3, 4], 14)
[1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2]
&#13;
/* Latest compiled and minified CSS included as External Resource*/


/* Optional theme */

@import url('//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-theme.min.css');
body {
  margin: 10px;
}
&#13;
&#13;
&#13;