Disable hover on specific div

前端 未结 2 918
遥遥无期
遥遥无期 2020-12-06 23:09

When I hover over my #icon div, an image appears. When I remove the mouse from #icon the image disappears.

THE PROBLEM

If I hover over the

相关标签:
2条回答
  • 2020-12-06 23:43

    Notice that you to specify every hover for every div while you are using id's, you need to specify the hover effect for every div, now you should use this :

    #image1{
    display:none;
    }
    
    #icons1:hover #image1
    display:block;
    }
    

    this means, whenever you hover the icon1, image1 will be displayed, and so.

    you can also try the opactiy:0; and opacity:1;

    0 讨论(0)
  • 2020-12-06 23:51

    Use pointer-events:none

    div{pointer-events:none}
    div:hover{color:red;}
    <div>Hover over me</div>

    0 讨论(0)
提交回复
热议问题