水平调整Bootstrap 3媒体对象主体的大小

时间:2015-01-03 20:23:59

标签: twitter-bootstrap-3

我需要同样调整.media-body元素的大小,以便它们可以长大到页面的左边界限,无论它们包装的文本如何。

<div class="container">
<div class="media">
    <a class="media-left" href="#">
        <img class="media-object" data-src="holder.js/64x64">
    </a>
    <div class="media-body">
      <p class="text-justify deal-text" >Lorem ipsum dolor sit amet, consectetur dipiscing elit. Duis pharetra varius quam sit amet vulputate. Quisque mauris augue, molestie tincidunt condimentum vitae, gravida a libero.</p>
   </div>
    <a class="media-right" href="#">
        <img class="media-object" data-src="holder.js/64x64">
    </a>
</div>
  <div class="media">
    <a class="media-left" href="#">
        <img class="media-object" data-src="holder.js/64x64">
    </a>
    <div class="media-body">
      <p class="text-justify deal-text" >Lorem ipsum</p>
   </div>
    <a class="media-right" href="#">
        <img class="media-object" data-src="holder.js/64x64">
    </a>
</div>
  <div class="media">
    <a class="media-left" href="#">
        <img class="media-object" data-src="holder.js/64x64">
    </a>
    <div class="media-body">
      <p class="text-justify deal-text" >Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis pharetra varius quam sit amet vulputate. Quisque mauris augue, molestie tincidunt condimentum vitae, gravida a libero.</p>
   </div>
    <a class="media-right" href="#">
        <img class="media-object" data-src="holder.js/64x64">
    </a>
</div>
</div>

这是snippet

1 个答案:

答案 0 :(得分:0)

这似乎有用......

<style>
  .media-body {
    width: 100% ;
  }
</style>