Show content when hovering over DIV

后端 未结 4 1759
余生分开走
余生分开走 2021-02-14 01:18

Is it possible to show content when hovering over the DIV. See Image

When I hover over the div, the transition takes place, but is it possible to show content inside the

4条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-14 01:33

    I assume you are trying to hide the bottom half of the background-image, but I just tested this exact code and it worked fine:

    
    
    
    
    
    
    

    That's the same exact code you used, except I used an image of my own.

    If what you want is to change the background image on hover, your CSS should be:

    .flowingdown:hover {
        height:100px;
        background-image:url(path.jpg);
    }
    

    Let me know if I misunderstood your question.

提交回复
热议问题