移动父母父div绝对左侧时,响应图像会放大

时间:2014-09-08 18:58:55

标签: css

我有一个内部响应图像的div,如下所示:

<div class="collection" style="" id="content">
<div class="collection row">
  <div class="row">
      <div class="col-xs-3"><img class="img-responsive" src="img/col1.jpg"></div>
      <div class="col-xs-3"><img class="img-responsive" src="img/col2.jpg"></div>
      <div class="col-xs-3"><img class="img-responsive" src="img/col3.jpg"></div>
      <div class="col-xs-3"><img class="img-responsive" src="img/col4.jpg"></div>      
  </div> <!-- end .row -->

  <div class="row">
      <div class="col-xs-3"><img class="img-responsive" src="img/col3.jpg"></div>
      <div class="col-xs-3"><img class="img-responsive" src="img/col4.jpg"></div>
      <div class="col-xs-3"><img class="img-responsive" src="img/col1.jpg"></div>
      <div class="col-xs-3"><img class="img-responsive" src="img/col2.jpg"></div>      
  </div> <!-- end .row -->

  <div class="row">
      <div class="col-xs-3"><img class="img-responsive" src="img/col4.jpg"></div>
      <div class="col-xs-3"><img class="img-responsive" src="img/col3.jpg"></div>
      <div class="col-xs-3"><img class="img-responsive" src="img/col2.jpg"></div>
      <div class="col-xs-3"><img class="img-responsive" src="img/col1.jpg"></div>      
  </div> <!-- end .row -->

</div>
</div>

#content div绝对定位为value0

如果我继续将其值递减10px,则在整个div实际开始向左移动之前,图像会一直放大到某一点(在这种情况下,它会等待,直到左边的值为300px)。 p>

为什么整个div通常不会首先向左移动?

1 个答案:

答案 0 :(得分:0)

我找到了你的问题。只需改变一下:

<div class="collection" style="" id="content">
<div class="collection row">

到此:

<div class="collection" style="" id="content">
<div class="collection container">