CSS placing one image on top of another

后端 未结 7 2098
闹比i
闹比i 2020-12-10 11:17

I am working on CSS design template.

I have two images imageOne and imageTwo.

Both are position: relative because if I

相关标签:
7条回答
  • 2020-12-10 11:53

    I've added a wrapper div for those images, with position relative and changed .image { position: relative to absolute and it worked for me. http://jsfiddle.net/uS7nw/2/

    <div class="container">
        <div class="imageOne image"></div>
        <div class="imageTwo image"></div>
    </div>
    

    And

    .container {
        position: relative;
    }
    
    .image {
        position: absolute;
        width: 100px;
        height: 100px;
        border: 1px solid red;
    }
    
    0 讨论(0)
提交回复
热议问题