0

I have a div that gets an image as background, and i want to make a div with a delete button that's visible only when you hover the image( the div with the image as background); How can i achieve that? Example: before:

enter image description here

while hovering:

enter image description here

  • 1
    Create a div with `background: rgba(0,0,0,0.2);` and add the two buttons in it also add `opacity: 0` to the div so that its opacity is 0 and it is invisible. Also, to make the transition smooth, add: `transition: 0.3s;`(Let the div be #option-box) To make it visible when hovering, use :hover state: #option-box:hover{ opacity: 1; } Now it will appear when you hover it. – Satyam Mishra Jan 09 '22 at 15:36

0 Answers0