使用Bootstrap 3,我有一个类似下面的标记:

<!-- Start of Container-->
<div class="container">
    <!-- Start of well-->
    <div class="well">
        <div id="wrapper" class="col-lg-6 col-md-6">
            <div id="layer3" class="col-lg-12 col-md-12"></div>
            <div id="layer2" class="col-lg-12 col-md-12"><img src="http://localhost/bg_sh.png" class="img-responsive" alt="Responsive image" /></div>
            <div id="layer1" class="col-lg-12 col-md-12"><img src="http://localhost/MapNAs.png" class="img-responsive" alt="Responsive image" /></div>
            <div id="canvas" class="col-lg-12 col-md-12"></div>
        </div>
    </div>
<!-- End of well-->
</div>
<!-- End of Container-->


您能否让我知道如何订购layer3,layer2,layer1和canvas div完全重叠

最佳答案

您是否期望这个demo

查看工作区demo

<!-- Start of Container-->
<div class="container">

  <div id="wrapper" class="row">
    <div id="layer3" class="col-sm-6 col-md-12">#layer3</div>
    <div id="layer2" class="col-sm-6 col-md-12">#layer2</div>
    <div id="layer1" class="col-sm-6 col-md-12">#layer1</div>
    <div id="canvas" class="col-sm-6 col-md-12">canvas</div>
  </div>

</div>
<!-- End of Container-->


More info here about bootstrap grid

关于css - 关于将4个Divs完全重叠的问题,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/23752276/

10-12 05:08