How can we overlap two images using css style?

后端 未结 4 749
花落未央
花落未央 2020-12-03 03:57

I have a list of images in an html table and need to overlap a small icon on each image. How can we do this using z index and positioning?

4条回答
  •  Happy的楠姐
    2020-12-03 04:56

    You could use position:relative and set right:30px, bottom:30px, that would shift it up and left by 30 pixels.

    CSS:

    .icon{
    position:relative;
    right:30px;
    bottom:30px;
    }
    

提交回复
热议问题