Image overlay on responsive sized images bootstrap

前端 未结 5 1626
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:11

    I had a bit of trouble getting this to work as well. Using brouxhaha's answer got me 90% of the way to what I was looking for. But the padding adjust wouldn't allow me to put the text anywhere I wanted. Using top and left seemed to work better for my purposes.

    .project-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        color: #fff;
        top: 80%;
        left: 20%;
    }
    

    http://jsfiddle.net/1rz0b7d8/1/

提交回复
热议问题