css技巧 1200px居中容器中某个div增加横屏背景

<div class='container' style='width:1200px;margin:0 auto;'>

  <div style='width:200px;margin:0 auto;height:164px;'><img src='XXX'></div>

</div>

 

container外 新增一行满屏div   设置z-index: -1  并且调整位置

<div style="width: 100%;height: 164px;background-color: #e8e8e8;display: inline-block;position: relative;top: -674px;z-index: -1"></div>
posted @ 2019-06-27 18:32  qcjdp  阅读(453)  评论(0编辑  收藏  举报

Bill

Jerry

Evil