Overlay Divs Without Absolute Position

前端 未结 7 1416
旧时难觅i
旧时难觅i 2020-12-24 01:36

What follows is a long explanation, but it\'s the only way to effectively communicate the issue I\'m trying to resolve...

I am (somewhat desperately, and entirely un

7条回答
  •  礼貌的吻别
    2020-12-24 01:59

    Simple fiddle: Just CSS

    Some guy posted another but it had a bunch of extra unnecessary code and some JS Another post had the answer but was missing something

    .over {
      background: rgba(230, 6, 6, .5);
      float: right;
      height: 460px;
      margin-top: -500px;
      margin-right: 159px;
      overflow: visible;
      position: relative;
      width: 560px;
      color: #FFFFFF;
      /* Just for looks*/
      z-index: 1000;
      padding: 20px/* Just for looks*/
    }
    
    .over span {
      position: relative;
      /* Just for looks*/
      top: 15px;
      /* Just for looks*/
    }
    
    .this {
      width: 560px;
      height: 460px;
      color: #FFFFFF;
      /* Just for looks*/
      padding: 20px;
      /* Just for looks*/
      background-image: url("http://www.tshirtvortex.net/wp-content/uploads/dramaticchipmunk.jpg");
      /* Just for looks*/
    }
    To BE UNDER
    ..or not To BE UNDER

    http://jsfiddle.net/3WDf7/

提交回复
热议问题