Image overlay on responsive sized images bootstrap

前端 未结 5 1623
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:16

    HEALTH & FITNESS

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Recusandae ipsam nemo quasi quo quae voluptate.

    .pic-card{ position: relative; } .pic-overlay{ top: 0; left: 0; right:0; bottom:0; width: 100%; height: 100%; position: absolute; transition: background-color 0.5s ease; } .content-inner{ position: relative; display: none; } .pic-card:hover{ .pic-overlay{ background-color: $dark-overlay; } .content-inner{ display: block; cursor: pointer; } .card-headings{ font-size: 15px; padding: 0; } .card-headings::after{ content: ''; width: 80%; border-bottom: solid 2px rgb(52, 178, 179); position: absolute; left: 5%; top: 25%; z-index: 1; } .p-overlay{ font-size: 15px; } } enter code here

提交回复
热议问题