【问题标题】:Making two COL Bootstrap 3 same height, but with padding使两个 COL Bootstrap 3 高度相同,但带有填充
【发布时间】:2014-03-28 01:06:33
【问题描述】:

我想让它看起来像这样,但没有 javascript,这是我想要的屏幕截图

这是我现在在 boostrap 3 中所做的,内联中的 css 因为我使用较少,而且这是简单的方法:)

HTML

 <section class="container-fluid" style="background-color:Red;
  background-size: cover; padding-top:145px; padding-bottom:145px;">
    <div class="container">
      <div class="row">
       <div class="col-md-6">
       <div class="element" style="background-color:white;  opacity:.90;
  -moz-opacity:.90; 
  filter:alpha(opacity=90); padding-top:20px; padding-bottom:20px; margin-top:20px; margin-bottom:44px; margin-right:15px; padding-left:15px;">
              <h2  class="color-brand">HEADING 2</h2>
              <p class="color-grey">Hello Mate</p>
            </div>
            </div>
   <div class="col-md-6">
        <div class="element" style="background-color:white;  opacity:.90;
  -moz-opacity:.90; 
  filter:alpha(opacity=90); padding-top:20px; padding-bottom:20px; margin-top:20px; margin-bottom:44px; margin-right:15px; padding-left:15px;">
              <h2  class="color-brand">HEADING 2</h2>
              <p class="color-grey">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
            </div>
            </div>
          </div>
</section>

这是工作的jfiddle

http://jsfiddle.net/D9tc4/

【问题讨论】:

标签: html css height twitter-bootstrap-3 css-tables


【解决方案1】:

你可以像这样使用负边距..

.element{
    padding:20px;
    margin-bottom: -99999px;
    padding-bottom: 99999px;
}

演示:http://www.bootply.com/125300

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-08-12
    • 2013-03-19
    • 1970-01-01
    • 2012-07-19
    • 2021-09-17
    • 2016-04-21
    相关资源
    最近更新 更多