我不知道为什么这个div出现在另一个div里面

时间:2017-11-13 20:34:47

标签: html css

我有两个部分,每个部分占据页面的整个高度和宽度。一个应该在另一个之下,但它出现在另一个内部,即使在html代码中它们彼此分开。 第三部分div出现在照片库div

.photo-gallery {
  width: 100%;
  height: 100%;
}

.image-collection {
  width: 100%;
}

.image-collection img {
  width: 33%;
  margin: 0;
}

.third-section {
  width: 100%;
  height: 100%;
}
<div class="photo-gallery">
  <div class="image-collection">
    <img src="http://sahara-experience.com/wp-content/uploads/2014/10/107620_cb8da068c718b9e6aa7aa0bcbc68d18f_large.jpg" />
    <img src="http://thescienceexplorer.com/sites/thescienceexplorer.com/files/blog/161130141053_1_540x360.jpg" />
    <img src="http://sahara-experience.com/wp-content/uploads/2014/10/107620_cb8da068c718b9e6aa7aa0bcbc68d18f_large.jpg" />

  </div>
  <div class="image-collection">
    <img src="http://sahara-experience.com/wp-content/uploads/2014/10/107620_cb8da068c718b9e6aa7aa0bcbc68d18f_large.jpg" />
    <img src="http://thescienceexplorer.com/sites/thescienceexplorer.com/files/blog/161130141053_1_540x360.jpg" />
    <img src="http://www.atlasmountainsguide.com/uploads/2/2/5/6/22560216/8975402_orig.jpg" />

  </div>
  <div class="image-collection">
    <img src="http://www.atlasmountainsguide.com/uploads/2/2/5/6/22560216/8975402_orig.jpg" />
    <img src="http://sahara-experience.com/wp-content/uploads/2014/10/107620_cb8da068c718b9e6aa7aa0bcbc68d18f_large.jpg" />
    <img src="http://thescienceexplorer.com/sites/thescienceexplorer.com/files/blog/161130141053_1_540x360.jpg" />

  </div>

</div>

<div class="third-section">
  <div class="left-side">
    <h3>some title</h3>
    <p>aodubdoaiwodb boabwdo badb aubdabd baodbaob oabd baodbaobd abdibaoib iwbdiab idbaibd oiabdiobao i bdoiab oibadiba ibdaobdaobdbaodadbaidb
    </p>
    <button>LETS GET STARTED</button>
  </div>
</div>

0 个答案:

没有答案