Show button on hover only

前端 未结 4 1942
后悔当初
后悔当初 2021-02-19 00:36

I\'ve read around and tried other solutions to my problem but none seem to work.

I have 3 images, each within their own 4-column div. I have a css transition set up so t

4条回答
  •  孤街浪徒
    2021-02-19 00:51

    You can set class to the image container and show the button on hover the image container.

    Please check this link with working example:

    .img-container:hover .button {
        display: block;
        position: absolute;
        left: 0;
        right: 0;
        bottom: 20px;
        width: 100%;
        text-align: center;
    }

提交回复
热议问题