Image overlay on responsive sized images bootstrap

前端 未结 5 1625
Happy的楠姐
Happy的楠姐 2020-12-04 22:36

I am trying to create a responsive grid of images (with descriptions) that when moused over will have a color overlay (just the image and not the text). Because of the respo

5条回答
  •  攒了一身酷
    2020-12-04 23:25

    When you specify position:absolute it positions itself to the next-highest element with position:relative. In this case, that's the .project div.

    If you give the image's immediate parent div a style of position:relative, the overlay will key to that instead of the div which includes the text. For example: http://jsfiddle.net/7gYUU/1/

     
    .parent { position: relative; }

提交回复
热议问题