Show content when hovering over DIV

后端 未结 4 1760
余生分开走
余生分开走 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:48

    Assume you have the following markup:

    Some content
    Only show this when hovering parent

    The CSS:

    #hover-content {
        display:none;
    }
    #parent:hover #hover-content {
        display:block;
    }
    

    This should do the trick.

    Not sure how you'd do it with transitions, but you'd have to put the same selector at least.

    Example

提交回复
热议问题